Example #1
0
 /**
  * Reimplement the store method to return the last inserted ID
  *
  * @return mixed When a new record was succesfully inserted, return the ID, otherwise the status
  */
 function store()
 {
     $isNew = $this->virtuemart_userfield_id == 0;
     if (!parent::store()) {
         // Write data to the DB
         vmError($this->getError());
         return false;
     } else {
         return $this->virtuemart_userfield_id;
     }
 }
Example #2
0
	/**
	 * Reimplement the store method to return the last inserted ID
	 *
	 * @return mixed When a new record was succesfully inserted, return the ID, otherwise the status
	 */
	public function store($updateNulls = false)
	{
		$isNew = ($this->virtuemart_userfield_id == 0);
		if (!parent::store($updateNulls)) { // Write data to the DB
			vmError($this->_db->getError());
			return false;
		} else {
			return $this->virtuemart_userfield_id;
		}
	}