mysql_query("UPDATE download_class SET classname = 'test' WHERE classid ='".$classid_up."' LIMIT 1 ;",$conn) or die("出错啦,请返回检查。");这样看看
我估计你的错误是在$classid_up=$classid[$i];这里,有可能$classid这个数组里的值不正确,建议你输出来确认一下。mysql_query("UPDATE `download_class` SET `classname` = 'test' WHERE `classid` =$classid_up LIMIT 1 ;",$conn) or die(mysql_error());看下错误信息。最好能输出你的sql 语句,这样更方便查找错误。
web_php 说的试了一下不管用. 擦肩而过 的试的一下,提示错误: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 6 就是说$classid_up是错误的? 但是之前在 $classid_up=$classid[$i]; echo $classid_up; 试过是可以的,而且每次循环都能echo出来传来的值,一放到sql就不行了
mysql_query("UPDATE `download_class` SET `classname` = 'test' WHERE `classid` =$classid_up LIMIT 1",$conn) or die("出错啦,请返回检查。"); no ";"
also inefficacy csdn的bbs太破了,附件都不能发
"UPDATE `download_class` SET `classname` = 'test' WHERE `classid` =$classid_up LIMIT 1 ;"这里面为什么还加个分号?去掉它试试看。
擦肩而过 的试的一下,提示错误:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 6
就是说$classid_up是错误的?
但是之前在
$classid_up=$classid[$i];
echo $classid_up;
试过是可以的,而且每次循环都能echo出来传来的值,一放到sql就不行了
no ";"
csdn的bbs太破了,附件都不能发