fix for SQL error: ERROR: syntax error at or near ")" at character 45
http://laconi.ca/trac/ticket/1735
This commit is contained in:
parent
35a78de93b
commit
06514aa001
|
@ -755,6 +755,10 @@ class Notice extends Memcached_DataObject
|
||||||
return new ArrayWrapper($notices);
|
return new ArrayWrapper($notices);
|
||||||
} else {
|
} else {
|
||||||
$notice = new Notice();
|
$notice = new Notice();
|
||||||
|
if (empty($ids)) {
|
||||||
|
//if no IDs requested, just return the notice object
|
||||||
|
return $notice;
|
||||||
|
}
|
||||||
$notice->whereAdd('id in (' . implode(', ', $ids) . ')');
|
$notice->whereAdd('id in (' . implode(', ', $ids) . ')');
|
||||||
$notice->orderBy('id DESC');
|
$notice->orderBy('id DESC');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue