原sql写法:
update table set a=a+b where id=1;
TP框架写法:
$where = $setData = array();
$where['id'] = 1;
$setData['a'] = array('exp', 'a+b');
M('table')->where($where)->save($setData);
2022-10-01 14:38:08
原sql写法:
update table set a=a+b where id=1;
TP框架写法:
$where = $setData = array();
$where['id'] = 1;
$setData['a'] = array('exp', 'a+b');
M('table')->where($where)->save($setData);