当前位置:Gxlcms > PHP教程 > 为什么$up只能到1,该如何解决

为什么$up只能到1,该如何解决

时间:2021-07-01 10:21:17 帮助过:6人阅读

为什么$up只能到1
$up=0;
while(@$_GET['action']=='up'){

$up++;
$up_sql="update message set up='$up' where id=$_GET[id]";
if(mysql_query($up_sql)){
echo $up;
exit('');
}
}

------解决方案--------------------
$up_sql="update message set up=up+1 where id=$_GET[id]";

人气教程排行