Warning: MyActiveRecord::Query() - query failed: SELECT i.* FROM items i INNER JOIN items_sections its ON its.items_id = i.id INNER JOIN sections s ON s.id = its.sections_id WHERE i.public AND s.id like '7' AND its.display_order < ORDER BY its.display_order DESC LIMIT 1 with error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY its.display_order DESC LIMIT 1' at line 1 in /htdocs/framework/common/activerecord.php on line 188

Fatal error: MyActiveRecord::FindBySql() - SQL Query Failed: SELECT i.* FROM items i INNER JOIN items_sections its ON its.items_id = i.id INNER JOIN sections s ON s.id = its.sections_id WHERE i.public AND s.id like '7' AND its.display_order < ORDER BY its.display_order DESC LIMIT 1 in /htdocs/framework/common/activerecord.php on line 596