Time : 11:45: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 ''1','2018-01-16','2018-01-16',5,5)' at line 1 Raw SQL : insert into invoicedetail(REFERENCENO,ADJUSTMENTDATE,adjustmentamount,ADJUSTMENTMETHODID,TRANSACTIONID,LEDGER,PARENTINVOICE,DRCR,CREATEDDATE,UPDATEDDATE,CREATEDBY,UPDATEDBY) values ('','2018-01-16','','23','95896','',,'1','2018-01-16','2018-01-16',5,5) Time : 05:55:57 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 4 Raw SQL : select sos.SUBORDERSID,ab.PAYMENTNOOFISSUES,sos.TARRIF,sos.AMOUNT,sos.discount,sos.discountamount,sos.netamount,sos.MAGZINEEDITIONS from advertisementbooking ab inner join suborders sos on sos.ADVERTISEBOOKINGID=ab.ADVERTISEMENTBOOKINGID inner join magzineeditions me on me.MAGZINEEDITIONSID=sos.MAGZINEEDITIONS where sos.SUBORDERSID=