Example #1
0
/**
 * Execute SQL query and return the first column of first row of the result
 *
 * @return mixed
 */
function dbFetchColumn($sql, &$errorMsg = null)
{
    $result = null;
    try {
        $result = \Includes\Utils\Database::fetchColumn($sql);
    } catch (Exception $e) {
        $errorMsg = $e->getMessage();
    }
    return $result;
}