classes/database/orm.php
/**
	 * Loads the matching database row into this object based on the primary_key already set
	 *
	 * @return bool
	 */
Loads the matching database row into this object based on the primary_key already set
@return bool
Loads the matching database row into this object based on the primary_key already set @return bool
public function load()
	{
		if ($this->loaded)
		return;
		$sql = 'SELECT * FROM "'. $this->name(). '" WHERE "'. $this->_primary_key. '" = ?';
		if ($results = $this->_db->fetch($sql, array($this->pk()), FALSE) AND ! empty($results[0]))
		{
			$this->_object = $results[0];
			return $this->saved = $this->loaded = TRUE;
		}
		return FALSE;
	}
public function load ( ) { if ( $ this -> loaded ) return ; $ sql = 'SELECT * FROM "' . $ this -> name ( ) . '" WHERE "' . $ this -> _primary_key . '" = ?' ; if ( $ results = $ this -> _db -> fetch ( $ sql , array ( $ this -> pk ( ) ) , FALSE ) AND ! empty ( $ results [ 0 ] ) ) { $ this -> _object = $ results [ 0 ] ; return $ this -> saved = $ this -> loaded = TRUE ; } return FALSE ; }
Loads the matching database row into this object based on the primary_key already set
 @return bool
Loads the matching database row into this object based on the primary_key already set @return bool
// Build the query // If a resulting row is found