修复数据提交中的保存错误

This commit is contained in:
wlx 2014-09-19 08:21:00 +00:00
parent 4dd37341ed
commit f5d73ba015
1 changed files with 1 additions and 1 deletions

View File

@ -2375,7 +2375,7 @@ class AuthorController extends Zend_Controller_Action
// 仅保存不存在的作者信息
$sql="insert into mdauthor (uuid,userid,ts_activated,status) select ?,?,now(),1 where not exists
(select id from mdauthor where uuid=? and userid=?)";
$this->db->query($sql,array($row['uuid'],$u_id),$row['uuid'],$u_id);
$this->db->query($sql,array($row['uuid'],$u_id,$row['uuid'],$u_id));
// 2. 保存变化记录 save changelog & userid for the latest version
$sql = "UPDATE en.mdversion SET changelog=?,userid=? WHERE id in (select id from en.mdversion where uuid=? order by ts_created desc limit 1)";