_isPublisher()) { $this->_addPublisher(); } try { $stmt = $this->PDO->prepare("INSERT INTO p_book (title, id_publisher, city) VALUES (:title, :id_publisher, :city)"); $stmt->execute(array( 'title' => $this->pub_name, 'id_publisher' => $this->publisher_id, 'city' => $this->city)); $master_id = $this->PDO->lastInsertId(); return $master_id; } catch (exception $ex) { common::except ('Err: ' .$ex .' in ' .__DIR__ .'/' .__FILE__ .':' .__LINE__); } return false; } }