Gdn_DataSet::firstRow PHP Method

firstRow() public method

Returns the first row or FALSE if there are no rows to return.
public firstRow ( string $DatasetType = false ) : boolean | array | stdClass
$DatasetType string The format in which the result should be returned: object or array.
return boolean | array | stdClass False when empty result set, object or array depending on $DatasetType.
    public function &firstRow($DatasetType = false)
    {
        $Result =& $this->result($DatasetType);
        if (count($Result) == 0) {
            return $this->_EOF;
        }
        return $Result[0];
    }