时间:2021-07-01 10:21:17 帮助过:32人阅读
simplequery($q);$a=$obj_db->fetchRow($r,DB_FETCHMODE_ASSOC);$ccd=$a[cca]+$a[ccb];$obj_db->simplequery("update member set ccd='$ccd' where id='5'");?>
$obj_db->simplequery("update member set ccd=cca+ccb where id='5'");
$obj_db->simplequery("update member set ccd=cca+ccb where id='5'");
$obj_db->simplequery("update member set ccd=cca+ccb");
$obj_db->simplequery("update member set ccd=cca+ccb");
这个才是楼主要求的,全表一次搞定
这就是标准的sql啊 跟php就没关系 . grammer: update tablename set cloum='' where ..
$obj_db->simplequery("update member set ccd=cca+ccb");
十分感谢!再继续请教一下:
如果要判断cca+ccb>110的才计算,怎么这样写不对啊:
$obj_db->simplequery("update member set ccd=cca+ccb where sum(cca+ccb)>110");
请帮忙纠正一下代码,谢谢!
update member set ccd=cca+ccb where cca+ccb>110
update member set ccd=cca+ccb where cca+ccb>110
谢谢