public static function oneValue($query, $parameters = [], $errorHandler = null)
    {
        // get the first record
        $record = static::oneRecord($query, $parameters, $errorHandler);

        if ($record) {
            // return first value of the record
            return array_shift($record);
        } else {
            return false;
        }
    }
public static function oneValue($query, $parameters = [], $errorHandler = null)
    {
        // get the first record
        $record = static::oneRecord($query, $parameters, $errorHandler);

        if ($record) {
            // return first value of the record
            return array_shift($record);
        } else {
            return false;
        }
    }
public static function oneValue ( $ query , $ parameters = [ ] , $ errorHandler = null ) { // get the first record $ record = static :: oneRecord ( $ query , $ parameters , $ errorHandler ) ; if ( $ record ) { // return first value of the record return array_shift ( $ record ) ; } else { return false ; } }
Returns the first value of the first database record from a query.

@param string $query A MySQL query
@param array|string $parameters Optional parameters for vsprintf (array) or sprintf (string) to use for formatting the query.
@param callable $errorHandler A callback that will run in the event of an error instead of static::handleError
@return string|false First field from the first record from a query or false if nothing found.
Returns the first value of the first database record from a query .