$data['up_date'] = $up_date;
$where_sql= "id='$id' and old_date<='$up_date'";
$model->where($where_sql)->data($data)->save();
echo $model->_sql();
输出:
UPDATE `house` SET `up_date`='2015-08-22 00:35:22' WHERE ( id='783219' and old_date<='2015-08-22 00:35'0'2')
同是$up_date,在where 后面变成了:'2015-08-22 00:35'0'2',不知什么原因?求助!
最佳答案
