Time : 11:06:27 SQLSTATE[42000]: Syntax error or access violation: 1064 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 '' at line 1 Raw SQL : select SUBORDERSID,ADVERTISEBOOKINGID,ORDERNO,PARTY from suborders,advertisementbooking where suborders.ADVERTISEBOOKINGID=advertisementbooking.ADVERTISEMENTBOOKINGID and PAGENO=1 and MAGZINEEDITIONS=173 and PAGETITLE= Time : 11:02:52 SQLSTATE[42000]: Syntax error or access violation: 1064 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 '' at line 1 Raw SQL : select ad.*,p.NAME from advertisementbooking ad inner join partydetail p on p.PARTYID=ad.PARTY where ADVERTISEMENTBOOKINGID= Time : 05:45:26 SQLSTATE[42000]: Syntax error or access violation: 1064 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 'and AUTOVOUCHERNO like '080618%' order by AUTOVOUCHERNO desc limit 1' at line 1 Raw SQL : select AUTOVOUCHERNO from mastertransaction where ACCOUNTVOUCHERTYPEID= and AUTOVOUCHERNO like '080618%' order by AUTOVOUCHERNO desc limit 1