Example #1
0
 private function save($bestelling)
 {
     $id = $bestelling->id;
     $retid = OpslagMedium::updateObject(TABLE_BEST, $bestelling->id, $bestelling->changedProperties);
     if ($retid != 0) {
         $query = $bestelling->getDatafieldname('id') . '=' . $bestelling->id . ' ';
         $this->convertdata(OpslagMedium::getObjectdataOnQuery(TABLE_BEST, $query));
         $retobj->result = true;
     }
 }
Example #2
0
 private function save($orderid)
 {
     $id = $this->id;
     $retid = OpslagMedium::updateObject(TABLE_ASSIGNEDBOOKS, $this->id, $this->changedProperties);
     if ($retid != 0) {
         $query = $this->getDatafieldname('id') . '=' . $this->id . ' ';
         $this->convertdata(OpslagMedium::getObjectdataOnQuery(TABLE_ASSIGNEDBOOKS, $query));
         $retobj->result = true;
     }
 }
Example #3
0
 private function isEmailUnique($email)
 {
     $flag = !OpslagMedium::doesRecordExist(DEFTABLE, 'emailadres', $email);
     return $flag;
 }
Example #4
0
 public function deleteObject($table, $id)
 {
     OpslagMedium::_getConnection();
     $sql = "DELETE FROM " . $table . " WHERE id=" . $id;
     $res = mysql_query($sql);
     if (!$res) {
         die('Something went wrong. Contact Adminstrator with errorcode = SO-' . $table . '.-' . mysql_errno() . '<br/>');
     }
     return $res;
 }
Example #5
0
 function getbooksids($orderid)
 {
     $query = ' orderid=' . $orderid;
     $data = OpslagMedium::getObjectdataOnQuery('bestelling_boek', $query);
     return $data;
 }
Example #6
0
 /**
  * @param1 is the book I want to save
  * @return the saved object
  **/
 public function save(Boek $book)
 {
     $properties = $book->giveAllPropertiesArray();
     // gets all the properties in the form of a array
     foreach ($properties as $key => $value) {
         $this->valtodata($key, $value);
     }
     $id = $book->id;
     if ($book->id == 0) {
         $retid = OpslagMedium::storeObject($this::tablename, $properties);
     } else {
         $retid = OpslagMedium::updateObject($this::tablename, $book->id, $book->changedProperties);
     }
     if ($retid != 0) {
         $query = $this->getDatafieldname('id') . '=' . $retid . ' ';
         $this->convertdata(OpslagMedium::getObjectdataOnQuery($this::tablename, $query));
         $retobj->result = true;
         return $this->GetBookObject();
     }
 }