Error Number: 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 'ORDER BY ChaptOrder LIMIT 1' at line 1
SELECT ChaptSlug FROM halachot_books_chapters WHERE ChaptOrder > 2 AND Status = 1 AND BookID = ORDER BY ChaptOrder LIMIT 1
Filename: models/Halachot_model.php
Line Number: 36