Time : 18:46:55 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 customerNature in (8,14,15,16,17) group by description order by ds.id asc' at line 2 Raw SQL : select DATE_FORMAT(me.DATEOFEDITIONS,'%d %b %Y') as DATEOFEDITIONS,ds.type,ds.description,sum(ds.currentClosingBalance) as currentClosingBalance,sum(ds.addCopies) as addCopies,sum(ds.lessCopies) as lessCopies,sum(ds.balanceCopies) as balanceCopies,sum(ds.courierCopies) as courierCopies,sum(ds.govtCopies) as govtCopies,sum(ds.byHand) as byHandCopies,customerNature from dispatchstatement ds inner join magzineeditions me on me.MAGZINEEDITIONSID=ds.magzineeditions where ds.magzineeditions= and customerNature in (8,14,15,16,17) group by description order by ds.id asc Time : 12:47:36 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 '301117%' order by AUTOVOUCHERNO desc limit 1' at line 1 Raw SQL : select AUTOVOUCHERNO from mastertransaction where ACCOUNTVOUCHERTYPEID= and AUTOVOUCHERNO like '301117%' order by AUTOVOUCHERNO desc limit 1 Time : 03:27:22 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 ipaddress from p_customers where customerid= Time : 03:27:17 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 mt.MASTERTRANSACTIONID=' at line 4 Raw SQL : select mt.REFERENCENO,mt.NARRATIONS,mt.AUTOVOUCHERNO,al.NAME,al.ISITPARTY,t.MASTERDRCR,t.TRANSACTIONID,mt.TRANSACTIONDATE,t.subamount,t.INSTRUMENTDATE,t.REFERENCENO as instno,t.NARRATIONS as transnarration from mastertransaction mt inner join transaction t on mt.MASTERTRANSACTIONID=t.MASTERTRANSACTIONID inner join accountledger al on al.ACCOUNTLEDGERID=t.ACCOUNTLEDGERID where ACCOUNTVOUCHERTYPEID= and mt.MASTERTRANSACTIONID= Time : 03:18:23 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 ipaddress from p_customers where customerid=