修改了重复写入mdversion表的sql bug

This commit is contained in:
Li Jianxuan 2012-06-11 09:34:57 +00:00
parent dc0b83af5c
commit 348912eb78
1 changed files with 6 additions and 5 deletions

View File

@ -3078,7 +3078,8 @@ class AuthorController extends Zend_Controller_Action
$sql="insert into mdversion (xml,ts_created,uuid,changelog,userid) $sql="insert into mdversion (xml,ts_created,uuid,changelog,userid)
select x.data,m.ts_created,?,?,? from metadata m left join xml x on m.id=x.id select x.data,m.ts_created,?,?,? from metadata m left join xml x on m.id=x.id
left join mdversion v on m.uuid=v.uuid left join mdversion v on m.uuid=v.uuid
where m.uuid=? and v.changelog is null"; where m.uuid=? and v.changelog is null
order by v.ts_created ASC LIMIT 1";
$sth=$this->db->prepare($sql); $sth=$this->db->prepare($sql);
try try
{ {