安装都正常,目前其它页面也都正常,但就是点击任何一个游戏都不能进入
点任何游戏都会跳出这个提示:

SQL Error:
Query: SELECT * FROM games WHERE cat=\'Action\' AND id!=\'2\' ORDER BY RAND() DESC LIMIT 0, 5
"

不知道是不是这个代码的问题:
代码:
echo "</td><td width='50%' valign='top' align='left'>";


echo "<div style='padding-bottom: 4px;'><b>" . language("ifyouliked",true) . " ".$game['name'].", " . language("alsoenjoy", true) . "...</b></div>";

$q = "SELECT * FROM games WHERE cat='".$game['cat']."' AND id!='".$game['id']."' ORDER BY RAND() DESC LIMIT 0, ".$themecfg['similargamesnumber']."";
$games2 = get_games("shortdesc=".$themecfg['maxdesclength']."&htmlize=true&diffquery=".$q);

foreach ($games2 as $game2) {

	dispgametd(true, $game2);

}

echo "</td></tr></table>";


附上:game.asp这个页面
代码:
<table width='100%' cellpadding='0' cellspacing='0'>
 <tr>
  <td width='20%' valign='top' style='padding-top: 4px;'>
   <?php include "leftcolumn.php"; ?>
  </td>
  <td width='80%' valign='top' class='paddedcontent'>

<?php


cache_output("do_event('gamepage');");

if(!is_cache()) {
	do_event("gamepage");
}


$maxwidth = $games_config['maxgamewidth'];
$minwidth = $games_config['mingamewidth'];
$maxnopopwidth = $games_config['maxnopopwidth'];

$game = get_game("id="._sp($params[1])."&maxwidth="._sp($maxwidth)."&minwidth="._sp($minwidth));
$cfg['pagetitle'] = $game['name'];
$cfg['metakey'] = $game['keywords'];
$cfg['metadesc'] = $game['desc'];

$game['time'] = date("M d, Y", $game['time']);

?>

<div class='menuheadgray'>
 <div class='menuheadtext'><?php echo $game['name']; ?></div>
</div>
<div class='menutext graymenutext largertext'>
 <center>

<?php


if ($game['type'] != 'extlink') {
	if ($game['width'] <= $maxnopopwidth) {
		echo $game['code']."<br /><br />";
		
		cache_output("do_event('gameplay');");
		if(!is_cache()) {
			do_event("gameplay");
		}
	} else {
		$link = get_play_link("id="._sp($params[1]));
		$width = $game['width'];
		$height = $game['height'];
		$link = "javascript:popup('".$link."', ".$width.", ".$height.")";
		echo "<b><a href=\"".$link."\" class='darklink'>- " . language("clickhere", true) . " ".$game['name']." " . language("newwindow", true) . " -</a></b>";
	}
} else {
	if (get_game_config("name=frameextlinks")==1) {
		$target = "";
	} else {
		$target = "target='_blank'";
	}

	echo "<br /><b><a href=\"".get_play_link("id="._sp($game['id']))."\" class='darklink' ".$target.">- " . language("clickhere", true) ." ".$game['name']." -</a></b><br /><br />";
}


if ($game['sponsorname'] != '') {
        if ($game['sponsorsite'] == '') {
		echo "<br />";
                echo "<b>" . language("sponsoredby", true) . ":</b> ".$game['sponsorname']."<br />\n";
        } else {
		echo "<br />";
                echo "<b>" . language("sponsoredby", true) . ":</b> <a class='darklink' href='http://".$game['sponsorsite']."'>".$game['sponsorname']."</a><br />\n";        
	}
} else if ($game['sponsorsite'] != '') {
	echo "<br />";
        echo "<b>" . language("sponsor", true) . ":</b> <a class='darklink' href='http://".$game['sponsorsite']."'>".$game['sponsorsite']."</a><br />\n";
}

?>

 </center>
</div>

<div class='menuheadgreen'>
 <div class='menuheadtext'><?php language("gameinfo"); ?></div>
</div>
<div class='menutext graymenutext'>
 <center>

<?php

echo "<table width='97%' cellpadding='0' cellspacing='0'><tr><td width='50%' valign='top' align='left' class='largertext'>";
echo "<b>" . language("addedon", true) . ":</b> ".$game['time']."<br />\n";

cache_output("\$result = mysql_query('SELECT `playcount` FROM `games` WHERE `id`=".$game['id']." LIMIT 1'); \$playcount = mysql_result(\$result, 0, 'playcount'); echo '<b>" . language("playcount", true) . ":</b> '.\$playcount.'<br />';");

if(!is_cache()) {
	echo '<b>' . language("playcount", true) . ':</b> '.$game['playcount'].'<br />';
}


echo "<b>" . language("category", true) . ":</b> <a href='".get_category_link("name=".$game['cat'])."'>".$game['cat']."</a><br />";
if ($game['type'] == 'SWF' || $game['type'] == 'DCR') {
	echo "<b>" . language("filename", true) . ":</b> ".hfilesize($game['filename'])."<br />\n";
}

if ($game['authorname'] != '') {
	if ($game['authorsite'] == '') {
		echo "<b>" . language("author", true) . ":</b> ".$game['authorname']."<br />\n";
	} else {
		echo "<b>" . language("author", true) . ":</b> <a class='darklink' href='http://".$game['authorsite']."'>".$game['authorname']."</a><br />\n";
	}
} else if ($game['authorsite'] != '') {
	echo "<b>" . language("author", true) . ":</b> <a class='darklink' href='http://".$game['authorsite']."'>".$game['authorsite']."</a><br />\n";
}

if ($game['authorname']!='') {
	$authorlink = get_author_link("name=".$game['authorname']);
	echo "<a href='".$authorlink."'>" . language("vgb", true) . "</a>";
	echo "<br />";
}


echo "<br /><b>" . language("description", true) . ":</b><br />";
echo $game['desc'];

if ($game['instructions'] != '') {
	echo "<br /><br /><b>" . language("instructions", true) . ":</b><br />";
	echo $game['instructions'];
}

cache_output("\$game = mysql_fetch_array(mysql_query(\"SELECT `rating` FROM `games` WHERE `id`='{$game['id']}' LIMIT 1\"));
		if (\$game['rating']!=0) {
			\$ratingimg = \"[themedir]ratings/\".round(\$game['rating']/2).\"stars.gif\";
			echo \"<br /><br /><b>\" . language(\"rating\", true) . \":</b><br /><img style='border: 0px; margin: 0px;' src='\$ratingimg' />\";
		}");

if(!is_cache()) {
	if ($game['rating']!=0) {
        $ratingimg = "[themedir]ratings/".round($game['rating']/2)."stars.gif";
        echo "<br /><br /><b>" . language("rating", true) . ":</b><br /><img style='border: 0px; margin: 0px;' src='$ratingimg' />";
	}

}


cache_output("\$game['id'] = {$game['id']};include '[instdir][pttdir]game-favorites.php';");

if(!is_cache()) {
	include "game-favorites.php";
}

//

if ((dispgamecode_enabled() && ($game['code']!='' || $game['disphtmlcode']!='')) || $game['disphtml'] == "Yes") {
	if ($game['disphtml'] != "No") {

		$gcode = $game['code']."<br /><center><a href='".get_home_link()."'>[sitetitle]</a></center>";

		if ($game['disphtmlcode']!='') {
			$gcode = $game['disphtmlcode'];
		}

		echo "<br /><br /><b>" . language("addgameto", true) . "</b><br />";
		echo "<textarea rows='12' cols='36' style='font-size: 9px; font-family: Verdana;'>";
		echo myhtmlentities($gcode);
		echo "</textarea>";
	}

}

echo "</td><td width='50%' valign='top' align='left'>";


echo "<div style='padding-bottom: 4px;'><b>" . language("ifyouliked",true) . " ".$game['name'].", " . language("alsoenjoy", true) . "...</b></div>";

$q = "SELECT * FROM games WHERE cat='".$game['cat']."' AND id!='".$game['id']."' ORDER BY RAND() DESC LIMIT 0, ".$themecfg['similargamesnumber']."";
$games2 = get_games("shortdesc=".$themecfg['maxdesclength']."&htmlize=true&diffquery=".$q);

foreach ($games2 as $game2) {

	dispgametd(true, $game2);

}

echo "</td></tr></table>";


if(!is_cache()) {
	if (theme_is_admin()) {
		$manage = theme_admin_link(language("managegames", true) , "darklink", "games", "manage");
		$edit =  theme_admin_link(language("editgame", true), "darklink", "games", "editgame-form", "id=".$game['id']);
	
		echo $manage;
		echo " - ";
		echo $edit;
	}
} else {
        cache_output("if(theme_is_admin()) { echo theme_admin_link('" . language('managegames', true) . "', 'darklink', 'games', 'manage') . \" - \" . theme_admin_link('" . language("editgame", true) . "', 'darklink', 'games', 'editgame-form', 'id=" . $game['id'] . "'); }");
}

echo "</center></div>";

cache_output("\$game['id'] = {$game['id']}; include '[instdir][pttdir]game-comments.php';");
	
if(!is_cache()) {
	include "game-comments.php";
}

if (taf_enabled()) {

	if (taf_login_required()==false || get_logged_in_user()!=false) {
	?>

<div class='menuheadgray'>
 <div class='menuheadtext'><?php language("tafgame"); ?> <?php echo $game['name']; ?></div>
</div>
<div class='menutext graymenutext'>


	<?php
	taf_form_display(get_game_link("id=".$game['id']));

	echo "</div>";

	}
}

?>
  </td>
 </tr>
</table>