SwatDB/SwatDB.php
public static function queryOne($db, $sql, $type = null)
    {
        $mdb2_type = $type === null ? true : $type;
        return self::executeQuery($db, 'queryOne', array($sql, $mdb2_type));
    }
public static function queryOne($db, $sql, $type = null)
    {
        $mdb2_type = $type === null ? true : $type;
        return self::executeQuery($db, 'queryOne', array($sql, $mdb2_type));
    }
public static function queryOne ( $ db , $ sql , $ type = null ) { $ mdb2_type = $ type === null ? true : $ type ; return self :: executeQuery ( $ db , 'queryOne' , array ( $ sql , $ mdb2_type ) ) ; }
Query a single value

Convenience method to query a single value in a single database column.

@param MDB2_Driver_Common $db The database connection.
@param string $sql The SQL to execute.
@param string $type Optional MDB2 datatype for the result.

@return mixed The value queried for a single result. Null when there are
no results.

@throws SwatDBException
Query a single value