Maison >développement back-end >tutoriel php >mysql_fetch_array(): supplied argument is not a valid MySQL result resource
php 无效sql结果资源 mysql
|
|
$sql = mysql_query("select * from frontpagenews where identification = ".$_GET['identification']." order by createDate desc limit 0,7");
mysql_query("select * from frontpagenews where identification = ".$_GET['identification']. "order by createDate desc limit 0,7");
除非 $_GET['identification'] 最后的字符是空格,不然 $_GET['identification'] 的值不就和 order 连在一起了?
如果 $_GET['identification'] = 1
你的 sql指令不就了
"select * from frontpagenews where identification = 1order by createDate desc limit 0,7"
吗?
粗心要人命啊。多谢了。少个空格