Example #1
0
 public function save(\Application\BookItem $book)
 {
     $fields_to_save = $book->toArray();
     unset($fields_to_save['id']);
     if (is_null($book->getId()) || $book->getId() == '') {
         return $this->makeInsertQuery('books', $fields_to_save, \Utility\Database::getInstance());
     } else {
         return $this->makeUpdateQuery('books', $fields_to_save, array('id' => $book->getId()), \Utility\Database::getInstance());
     }
 }
Example #2
0
 public function save(\Application\BookItem $bookItem)
 {
     if (is_null($bookItem->getId())) {
     }
 }