Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') OR (order_id =  AND id > 4352)) AND album_id =    ORDER BY `order_id` ASC,  `i' at line 1 [CORE/cake/libs/model/datasources/dbo_source.php, line 526]

Query: SELECT `ModAlbumPhoto`.`id`, `ModAlbumPhoto`.`album_id`, `ModAlbumPhoto`.`photo`, `ModAlbumPhoto`.`description`, `ModAlbumPhoto`.`order_id`, `ModAlbumPhoto`.`date`, `ModAlbumPhoto`.`dir` FROM `cms_mod_albums_photos` AS `ModAlbumPhoto` WHERE ((order_id > ) OR (order_id = AND id > 4352)) AND album_id = ORDER BY `order_id` ASC, `id` ASC LIMIT 1

Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') OR (order_id =  AND id < 4352)) AND album_id =    ORDER BY `order_id` DESC,  `' at line 1 [CORE/cake/libs/model/datasources/dbo_source.php, line 526]

Query: SELECT `ModAlbumPhoto`.`id`, `ModAlbumPhoto`.`album_id`, `ModAlbumPhoto`.`photo`, `ModAlbumPhoto`.`description`, `ModAlbumPhoto`.`order_id`, `ModAlbumPhoto`.`date`, `ModAlbumPhoto`.`dir` FROM `cms_mod_albums_photos` AS `ModAlbumPhoto` WHERE ((order_id < ) OR (order_id = AND id < 4352)) AND album_id = ORDER BY `order_id` DESC, `id` DESC LIMIT 1