Ok...figured it out...here is the new code:
PHP Code:
maketableheader("Member Games");
$result=$DB_site->query("SELECT * FROM vwar_games ORDER BY gamename ASC");
echo "<tr class='".getrowbg()."'>";
while($game=$DB_site->fetch_array($result))
{
$result2=$DB_site->query_first("SELECT COUNT(membergamesid) FROM vwar_membergames
WHERE userid='$userid' AND gameid='".$game["gameid"]."'");
echo "<td>".
makeyesnocode("$game[gamename]","$game[gameid]","$result2[0]")."</td>";
echo "</tr>\n";
}
doformfooter("Modify Profile","");
}