$resDel = $CollectionModel->where(['user_id'=>$userId,'audio_id' => ['in', $arrDelAudioId], 'collection_group_id' => $param['old_collection_group_id']])->update($dataDel);
echo $CollectionModel->getLastSql();exit;
if ($resDel === false) {
//回滚事务
$this->rollback();
$this->error = '删除原剪报信息失败';
return false;
}
打印出的数据库语句能成功执行,但在代码里返回的值是0,该怎么修改啊?
数据库语句如下:
UPDATE collection
SET collection_group_id = 7,
updatetime = 1536509881,
deletetime = 1536509881,
updator = 4
WHERE
(
user_id = 4
AND audio_id IN (12)
AND collection_group_id = 7
)
AND collection.deletetime IS NULL
最佳答案