Exemplo n.º 1
0
function createOverviewTable()
{
    global $variables;
    $table = $variables['categoriesTableName'];
    $query = "SELECT * FROM {$table}";
    $result = mysql_query($query) or die(" Find createOverviewTable query Failed!" . mysql_error());
    $text = "";
    while ($category = mysql_fetch_array($result)) {
        $text .= createOverviewTableForCategory($category['category_id']);
        $text .= "<br>";
    }
    return $text;
}
Exemplo n.º 2
0
function createOverviewTable()
{
    global $variables;
    $election_id = getCurrentElectionID();
    $table = $variables['categoriesTableName'];
    $query = "SELECT * FROM {$table} WHERE election_id = {$election_id}";
    //$result = mysql_query($query) or die(" Find createOverviewTable query Failed!".mysql_error());
    $result = runQuery($query);
    $election = getCurrentElectionInfo();
    $date = new DateTime($election['election_date']);
    $d = date_format($date, "M d, Y");
    $text = "<h1>Unofficial Results -  {$election['name']} {$d} {$election['location']}</h1>";
    while ($category = $result->fetch_assoc()) {
        //mysql_fetch_array($result)){
        $text .= createOverviewTableForCategory($category['id']);
        $text .= "<br>";
    }
    return $text;
}