while ($query1 = mysql_fetch_array($query))
{$body2 = "【<a href=\"".$i.".html\">".$query1['type']."</a>】";
$sql = "select name,address from link where type=".$query1['type']." and action='2' ORDER BY id DESC LIMIT 0, $maxrecommend";
$rs = mysql_query($sql); 
while ($rs1 = mysql_fetch_array($rs))
{
  $body21 = "<a href=\"http://".$rs1['address']."\">".$rs1['name']."</a>".$body21;

$body2 = $body2.$body21.'<br>'; 
$i++;
error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\APMServ5\APMServ5.2.0\www\htdocs\link\admin\update.php on line 34