Most Anticipated Game of 2013 Poll

Thanks for your vote!

Voting will close on Sunday, January 6th, and we'll announce our results on Monday, January 7th. You may return once per hour to help your game rise to the top. Rally your friends and champion the cause!

function _most_anticipated_print_results($cid) {
$nid = 246999;

echo "

    ";
    $name_sql = "SELECT extra FROM webform_component " .
    "WHERE nid = %d AND cid = %d";
    $name_result = db_fetch_object(db_query($name_sql, $nid, $cid));
    $name_data = unserialize($name_result->extra);
    $name_data = $name_data['items'];
    $name_data = explode("\n", $name_data);
    $names = array();
    foreach ($name_data as $name) {
    $names[substr($name, 0, strpos($name, '|'))] = substr($name, strpos($name, '|')+1);
    }

    $sql = "SELECT data, COUNT(data) AS count " .
    "FROM webform_submitted_data " .
    "WHERE nid = %d AND cid = %d AND data != ''" .
    "GROUP BY data " .
    "ORDER BY count DESC " .
    "LIMIT 3";
    $results = db_query($sql, $nid, $cid);
    while ($result = db_fetch_object($results)) {
    $name = isset($names[$result->data]) ? $names[$result->data] : $result->data;
    echo "

  1. " . $name . "
  2. ";
    }
    echo "

";
}

echo "Top Three Results:
";
_most_anticipated_print_results(2);
?>

Last Updated: Mar 13, 2016

About The Author

Karen is H.D.i.C. (Head Druid in Charge) at EQHammer. She likes chocolate chip pancakes, warm hugs, gaming so late that it's early, and rooting things and covering them with bees. Don't read her Ten Ton Hammer column every Tuesday. Or the EQHammer one every Thursday, either.

Comments