/** * Function only for private use inside class */ private function _selectModelFromDatabase($id) { $this->clear(); $sql = $this->_getSelectQuery_($id); if ($this->_SQL_DEBUG) { die($sql); } $res = $this->_DBLINK->execSQL($sql); if ($res === false) { $err = $this->_DBLINK->getLastError(); return $this->_setError($err['text']); } if ($res === false) { $error = $this->_DBLINK->getLastError(); return $this->_setError($error['text']); } if (is_array($res) && isset($res[0])) { $this->fill($res[0]); } return $this->_setError(null); }