public function first($useMasterKey = false)
    {
        $this->limit = 1;
        $result = $this->find($useMasterKey);
        if (count($result))
        {
            return $result[0];
        } else
        {
            return array();
        }
    }
public function first($useMasterKey = false)
    {
        $this->limit = 1;
        $result = $this->find($useMasterKey);
        if (count($result))
        {
            return $result[0];
        } else
        {
            return array();
        }
    }
public function first ( $ useMasterKey = false ) { $ this -> limit = 1 ; $ result = $ this -> find ( $ useMasterKey ) ; if ( count ( $ result ) ) { return $ result [ 0 ] ; } else { return array ( ) ; } }
Execute a query to get only the first result.

@param bool $useMasterKey If the query should use the master key

@return array
Execute a query to get only the first result .