Time : 14:26:25 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 : 14:19:29 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 : 14:19:25 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 : 14:18:43 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 : 14:15: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 : 14:06:13 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 : 05:33:09 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 'order by sos.DUMMYPAGENO,tf.COLOR,tf.PAGESIZE,tf.ID,p.NAME asc' at line 1 Raw SQL : select p.PARTYID,sos.DUMMYPAGENO,p.NAME,ps.PAGENAME,m.VALUE as color,ab.ORDERNO,mpos.VALUE as positionfix,ab.remarks,if(sos.ISPAGEFIX=0,'UnFix',if(sos.ISPAGEFIX is null, 'UnFix','Fix')) as pagefixval,tf.CODE from advertisementbooking ab inner join suborders sos on sos.ADVERTISEBOOKINGID=ab.ADVERTISEMENTBOOKINGID inner join partydetail p on p.PARTYID=ab.PARTY inner join tarrifdetail tf on tf.ID=sos.TARRIF inner join pagesizes ps on ps.ID=tf.PAGESIZE inner join master m on m.MASTERID=tf.COLOR left outer join master mpos on mpos.MASTERID=sos.POSITION where (sos.ISCANCEL=0 || sos.ISCANCEL IS NULL) and sos.MAGZINEEDITIONS= order by sos.DUMMYPAGENO,tf.COLOR,tf.PAGESIZE,tf.ID,p.NAME asc