Пример #1
0
function get_stat($db, $stat, $flag, $file)
{
    $full_flag = get_full_flag($flag, $file);
    $pdos = q($db, "SELECT num FROM results" . " WHERE file == '{$file}'" . " AND flags == '{$full_flag}'" . " AND test == '{$stat}'");
    $result = $pdos->fetchColumn(0);
    if ($result === false) {
        var_dump($result);
        i("returning zero for missing stat: {$stat}, '{$flag}', {$file}");
        return 0;
    }
    l("returning {$result} for found stat: {$stat}, '{$flag}', {$file}");
}
Пример #2
0
function get_stat($db, $stat, $flag, $file)
{
    $full_flag = get_full_flag($flag, $file);
    $pdos = $db->query("SELECT num FROM combined_results" . " WHERE file == '{$file}'" . " AND flags == '{$flag}'" . " AND test == '{$stat}'");
    $result = $pdos->fetchColumn(0);
    if ($result === false) {
        return -1;
    }
    return $result;
}