时间:2021-07-01 10:21:17 帮助过:14人阅读
$obj_db->simplequery("update member set ccd=cca+ccb");
$id=12;
$obj_db->simplequery("update member set ccd=cca+ccb where id='$id'");
$q="select * from member where id='$id'";
$r=$obj_db->simplequery($q);
$a=$obj_db->fetchrow($r,DB_FETCHMODE_ASSOC);
$mccd=$a[cca]+$a[ccb];
$query="insert into mingxi (mid,mccd,mtime) values ('$id','$mccd','$time')";
$obj_db->simplequery($query);
//$id=12;
$obj_db->simplequery("update member set ccd=cca+ccb ");
$q="select * from member'";
$r=$obj_db->simplequery($q);
while($a=$obj_db->fetchrow($r,DB_FETCHMODE_ASSOC)){
$id=$a[id];
$mccd=$a[cca]+$a[ccb];
$query="insert into mingxi (mid,mccd,mtime) values ('$id','$mccd','$time')";
$obj_db->simplequery($query);
}