Time : 23:47:21 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 : 08:01:50 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 'group by PARENTINVOICE) inv2 on inv2.PARENTINVOICE=inv1.INVOICEDETAILID where i' at line 3 Raw SQL : select inv1.INVOICEDETAILID,inv1.REFERENCENO,inv1.adjustmentamount,inv2.adjustamt,(inv1.adjustmentamount-inv2.adjustamt) as diffamount, inv1.PARENTINVOICE,if(inv1.DRCR=1,'Cr','Dr') as DRCR,DATE_FORMAT(inv1.ADJUSTMENTDATE,'%d %b %Y') as refwithdate,inv2.TRANSACTIONID from invoicedetail as inv1 left outer join (select sum(adjustmentamount) as adjustamt,INVOICEDETAILID,PARENTINVOICE,TRANSACTIONID,REFERENCENO from invoicedetail where LEDGER= group by PARENTINVOICE) inv2 on inv2.PARENTINVOICE=inv1.INVOICEDETAILID where inv1.LEDGER= group by inv1.REFERENCENO order by inv1.ADJUSTMENTDATE Time : 06:33:44 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 : 06:32:14 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 : 06:31:05 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 : 06:12:30 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=