求一php写法!! 你的SQL是什么意思呢?让select=select + 1 吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 要update的字段是有三个:selectwin,selecttie,selectlost.其中selected是我从提交的那页取过来的。他有三个值。分别是win,tie,lost.我是根据不同的selected来update那三个字段.所以在update的时候字段用select"&selected&".也就是说update的一次,selectwin,selecttie或者selectlost加1 $select=$_POST["option"];$selectall="select".$select;$sql="update research set '$selectall'= '$selectall'+1 where id=1";$a=mysql_query($sql); $select=$_POST["option"];$sel="select".$select;$aa=$select+1;$sql="update research set ".$sel."=".$aa." where id=1";$query=mysql_query($sql); $select=$_POST["option"];$selectall="select".$select;$sql="update research set $selectall= $selectall+1 where id=1";$a=mysql_query($sql); $select=$_POST["option"];$selectall="select".$select;$sql="update research set $selectall= $selectall+1 where id=1";$a=mysql_query($sql); 编码问题 求解:ImagickDraw如何设置文字描边位移? 请问google搜索框效果如何实现呢? 问一个简单的问题 php socket问题 checkbox问题 [root@localhost:3306] ERROR 1146: Table 'toy.1' doesn't exist 一个简单的问题!请务必解答我,要不然我睡不着觉! 哇,人气太差了吧~~我送点分吧!!! php如何获取网页并替换文字或者链接 在redhat7.2下用系统自带的apache server运行php不能连接mysql?急! 怪问题,希望高手解答
其中selected是我从提交的那页取过来的。他有三个值。分别是win,tie,lost.
我是根据不同的selected来update那三个字段.
所以在update的时候字段用select"&selected&".
也就是说update的一次,selectwin,selecttie或者selectlost加1
$selectall="select".$select;
$sql="update research set '$selectall'= '$selectall'+1 where id=1";
$a=mysql_query($sql);
$sel="select".$select;
$aa=$select+1;
$sql="update research set ".$sel."=".$aa." where id=1";
$query=mysql_query($sql);
$selectall="select".$select;
$sql="update research set $selectall= $selectall+1 where id=1";
$a=mysql_query($sql);
$selectall="select".$select;
$sql="update research set $selectall= $selectall+1 where id=1";
$a=mysql_query($sql);