Database Error: 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 (ai.sortorder = and <)) order by ai.sortord' at line 10
From:select as albumname,a.siteurl,i.status,i.path,i.audiopath,, i.keywords,i.description,i.exif,i.date_addition,i.views,ai.sortorder,i.type, i.date_picture, as imageid from album a, albumimage ai, image i where and and i.status = 'active' and =58905 and (ai.sortorder < or (ai.sortorder = and <)) order by ai.sortorder desc, limit 1