_tbl_key; $id = $this->$k; if (!$id) { return false; } } $sql = "SELECT $this->_tbl_key FROM $this->_tbl WHERE $this->_tbl_key=$id"; $this->_db->setQuery($sql); $this->_db->query(); return $this->_db->getAffectedRows(); } function store($updateNulls = false) { $this->Last_Updated = NULL; $k = $this->_tbl_key; global $migrate; if ($this->exists() && !$migrate) { $ret = $this->_db->updateObject($this->_tbl, $this, $this->_tbl_key, $updateNulls); } else { $ret = $this->_db->insertObject($this->_tbl, $this, $this->_tbl_key); } if (!$ret) { $this->_error = strtolower(get_class($this)) . "::store failed
" . $this->_db->getErrorMsg(); return false; } else { return true; } } } ?>