SELECT * FROM mx_services WHERE status = 1 AND serviceID < ORDER BY serviceID DESC LIMIT 1
SELECT * FROM mx_services WHERE status = 1 AND serviceID < ORDER BY serviceID DESC LIMIT 1
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 serviceID DESC LIMIT 1' at line 1