Exemple #1
0
 /**
  * Loads the data from the database, remember to load before do anything.
  * @return boolean
  */
 public function load()
 {
     if ($this->_id != 0) {
         $sql = "SELECT *\n              FROM {$this->_tableName}\n              WHERE {$this->_idField}={$this->_id};";
         if (!($this->_data = $this->_DbConnection->getRow($sql))) {
             return false;
         }
         $this->_loaded = true;
         return true;
     }
     return false;
 }