public static function fetchOne($sql, $parameters = array())
    {
        try {
            self::logSql(__FUNCTION__, $sql, $parameters);

            return self::get()->fetchOne($sql, $parameters);
        } catch (Exception $ex) {
            self::logExtraInfoIfDeadlock($ex);
            throw $ex;
        }
    }
public static function fetchOne($sql, $parameters = array())
    {
        try {
            self::logSql(__FUNCTION__, $sql, $parameters);

            return self::get()->fetchOne($sql, $parameters);
        } catch (Exception $ex) {
            self::logExtraInfoIfDeadlock($ex);
            throw $ex;
        }
    }
public static function fetchOne ( $ sql , $ parameters = array ( ) ) { try { self :: logSql ( __FUNCTION__ , $ sql , $ parameters ) ; return self :: get ( ) -> fetchOne ( $ sql , $ parameters ) ; } catch ( Exception $ ex ) { self :: logExtraInfoIfDeadlock ( $ ex ) ; throw $ ex ; } }
Executes an SQL `SELECT` statement and returns the first column value of the first
row in the result set.

@param string $sql The SQL query.
@param array $parameters Parameters to bind in the query, eg, `array(param1 => value1, param2 => value2)`.
@throws \Exception If there is a problem with the SQL or bind parameters.
@return string
Executes an SQL SELECT statement and returns the first column value of the first row in the result set .