fix sql error

This commit is contained in:
wlx 2013-05-16 01:45:16 +00:00
parent 00168e0317
commit 10cfd068be
1 changed files with 1 additions and 1 deletions

View File

@ -2522,7 +2522,7 @@ class Admin_DataController extends Zend_Controller_Action
$sth -> execute(array($row['uuid'],$id,2));
} else {
$sql = "SELECT v.* FROM mdversion v
WHERE v.uuid=? and (v.id=? or v.ts_created<(select ts_created from mdversion where changelog is not null and id=?))
WHERE v.uuid=? and (v.id=? or (v.ts_created<(select ts_created from mdversion where id=?) and changelog is not null))
ORDER BY v.ts_created DESC
LIMIT ?";
$sth = $this->db->prepare($sql);