diff options
Diffstat (limited to 'apps/gallery/ajax/getAlbums.php')
-rw-r--r-- | apps/gallery/ajax/getAlbums.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/gallery/ajax/getAlbums.php b/apps/gallery/ajax/getAlbums.php index 6b551ac49d5..2829dae81f3 100644 --- a/apps/gallery/ajax/getAlbums.php +++ b/apps/gallery/ajax/getAlbums.php @@ -7,12 +7,12 @@ if (!OC_User::IsLoggedIn()) { } $a = array(); -$stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE uid_owner = ?'); +$stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE `uid_owner` = ?'); $result = $stmt->execute(array(OC_User::getUser())); while ($r = $result->fetchRow()) { $album_name = $r['album_name']; - $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_photos WHERE album_id = ?'); + $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_photos WHERE `album_id` = ?'); $tmp_res = $stmt->execute(array($r['album_id'])); $a[] = array('name' => $album_name, 'numOfItems' => min($tmp_res->numRows(), 10)); } |