fix sql error

This commit is contained in:
wlx 2014-09-18 07:09:42 +00:00
parent cc075c5c9e
commit a03634d816
1 changed files with 1 additions and 1 deletions

View File

@ -2373,7 +2373,7 @@ class AuthorController extends Zend_Controller_Action
// 保存数据作者信息 // 保存数据作者信息
// 仅保存不存在的作者信息 // 仅保存不存在的作者信息
$sql="insert into mdauthor (uuid,userid,ts_activated,status) values(?,?,now(),1) where not exists $sql="insert into mdauthor (uuid,userid,ts_activated,status) select ?,?,now(),1 where not exists
(select * from mdauthor where uuid=? and userid=?)"; (select * 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));