SQL: SELECT * FROM `TABLE_PRODUCTS` WHERE `RECORDID` <> '' AND `MASTERPARTNO` = 'St Paddy's 22_copy_copy_2' AND `LIVESTOCK` > 0 AND `ALLYEAR` <> 0 ORDER BY IF(`SORTNUM` <> '',`SORTNUM`,99999), `TITLE`
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 's 22_copy_copy_2' AND `LIVESTOCK` > 0 AND `ALLYEAR` <> 0 ORDER ' at line 7