$arr=array("1","2","3","5","10","6","9"); $query=mysql_query("select * from aaa where id in($arr)");//in("Êý×é")£¬Ã÷Á˵ÄÒâ˼---È¡µÃid=1¡¢2¡¢3...µÄÐÅÏ¢ while($result=mysql_fetch_array($query)){ echo $result[0]."<br>"; echo $result[1].""<br>; } ?>
´íÎóÐÅÏ¢£ºmysql_fetch_array(): supplied argument is not a valid MySQL result resource .......echo $query¿´Ò»ÏÂÓï¾ä¡£ PHP code:
$query=mysql_query("select * from aaa where id in('$arr')");
µ¥ÒýºÅ£¬Ë«ÒýºÅ...¶¼ÊÔ¹ý£¬»¹ÊDz»ÐÐ- -£¡ ÄãÕæÓвţ¬Ö±½Ó°ÑÊý×é·Åµ½×Ö·û´®ÀïÈ¥ ¸øÄãÌáʾÏ£¬ÓÃjoinº¯Êý UP UP UP ....... LZ»¹upʲô£¬¸Ï½ôÈ¥¸´Ï°sqlµÄinÓï¾ä£¬