我有这个查询 UPDATE注释SET like = NOT(like)WHERE userid = 12345
如何使用cakephp?
我试过
$update=array('like NOT' => '(like)');
$conditions=array('userid' => 12345);
$res = $this->updateAll($update,$conditions);
但不起作用。
答案 0 :(得分:0)
尝试
$update = array('like' => '1-like');
$conditions = array('userid' => 12345);
$res = $this->updateAll($update, $conditions);