SUCCESS - Most Anticipated Games of 2012 Poll

by on Nov 21, 2011

<style> .story_header{display:none;} #block_default .story_body{background:url('http://images.tentonhammer.com/TTH/contests/Most-Anticipated-of-2012-footer.jpg') no-repeat bottom, url('http://images.tentonhammer.com/TTH/contests/Most-Anticipated-of-

.story_header{display:none;} #block_default .story_body{background:url('http://images.tentonhammer.com/TTH/contests/Most-Anticipated-of-2012-footer.jpg') no-repeat bottom, url('http://images.tentonhammer.com/TTH/contests/Most-Anticipated-of-2012-bg.png') repeat;padding-bottom:150px;} #contestlogo, #contestfooter{margin:0 -10px;} #contestlogo{margin-top:-10px;} #contestfooter{margin-bottom:20px;}

Thanks for your vote!

Thanks for casting your vote! We'll announce the winners of our Most Anticipated Games of 2012 poll in mid-December. Meanwhile, keep an eye on Ten Ton Hammer to see who's winning, and don't forget to tell your friends to cast their votes, too.

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

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 "

" . $name . "

";
}
echo "

";
}

echo "Top Three Results (MMO):
";
_most_anticipated_print_results(1);
echo "Top Three Results (non-MMO):
";
_most_anticipated_print_results(3);
?>


Last Updated: Mar 13, 2016