$maintitle = " - Games";$nav="home"; require_once($_SERVER['DOCUMENT_ROOT'].'/includes/header.php'); $ludate_result = mysql_query("SHOW TABLE STATUS FROM db162598_gumain WHERE Name = 'games';"); while ($array = mysql_fetch_array($ludate_result)) { $posted = date("F jS, Y - g:ia",strtotime($array['Update_time'])); } ?>
$result = mysql_query("SELECT game_id,name,edition,edition_name,expansion,expansion_name,primary_type,type,ages,players,times,year,publisher,imgsrc,source,notes FROM games ORDER BY primary_type,name,edition,expansion,expansion_name");
$cnt = 1;
$gameprev = "";
$typeprev = "";
while($row = mysql_fetch_assoc($result)){
$gameedition = $row['name'].$row['edition'];
$gamename = $row['name'].' '.$row['edition_name'];
if ($row['primary_type'] == "b") { $showtype = "Board Games"; }
elseif ($row['primary_type'] == "c") { $showtype = "Card Games"; }
elseif ($row['primary_type'] == "d") { $showtype = "Dice Games"; }
elseif ($row['primary_type'] == "l") { $showtype = "Logic Games"; }
elseif ($row['primary_type'] == "m") { $showtype = "Miniature Games"; }
elseif ($row['primary_type'] == "p") { $showtype = "Party Games"; }
elseif ($row['primary_type'] == "t") { $showtype = "Tile Games"; }
elseif ($row['primary_type'] == "x") { $showtype = "Dexterity Games"; }
elseif ($row['primary_type'] == "y") { $showtype = "Classics"; }
if ($gameedition != $gameprev) {
if ($cnt != 1) { echo '
';
}
echo ''.$row['name'].' '.$row['edition_name'].'
('.$row['year'].') - '.$row['publisher'].'