fix for SQL error: ERROR: syntax error at or near ")" at character 45

http://laconi.ca/trac/ticket/1735
This commit is contained in:
Brenda Wallace 2009-08-28 20:00:55 +12:00
parent c0d03fc279
commit e277c856d6
1 changed files with 4 additions and 0 deletions

View File

@ -732,6 +732,10 @@ class Notice extends Memcached_DataObject
return new ArrayWrapper($notices);
} else {
$notice = new Notice();
if (empty($ids)) {
//if no IDs requested, just return the notice object
return $notice;
}
$notice->whereAdd('id in (' . implode(', ', $ids) . ')');
$notice->orderBy('id DESC');