summaryrefslogtreecommitdiff
path: root/cryptominisat5/cryptominisat-5.6.3/web/get_gitrevs.php
blob: 72c89e38bf068b5dffcc9b70c4bbccb394a9ab58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
include "connect.php";

function fill_gitrevs($sql)
{
    $query = "select `gitrev` from `solverRun` group by `gitrev`;";
    $stmt = $sql->prepare($query);
    if (!$stmt) {
        die("Cannot prepare statement");
    }
    $result = $stmt->execute();
    $json = array();

    while($arr=$result->fetchArray(SQLITE3_ASSOC))
    {
         $data = array(
            'gitrev' => $arr["gitrev"],
        );
        array_push($json, $data);
    }
    $jsonstring = json_encode($json);
    echo $jsonstring;
    $stmt->close();
}
fill_gitrevs($sql);
?>
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback