Time : 12:49:11 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 '00:00:00 AND 2016-12-08 00:00:00 order by DISPATCHDATE DESC' at line 1 Raw SQL : select count(DISPATCHREGISTERID) as totalnew_parties from dispatchregister as ab,partydetail as p where p.PARTYID=ab.FIRMNAME and DISPATCHDATE BETWEEN 2016-06-05 00:00:00 AND 2016-12-08 00:00:00 order by DISPATCHDATE DESC Time : 12:47: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 'AND order by DISPATCHDATE DESC' at line 1 Raw SQL : select count(DISPATCHREGISTERID) as totalnew_parties from dispatchregister as ab,partydetail as p where p.PARTYID=ab.FIRMNAME and DISPATCHDATE BETWEEN AND order by DISPATCHDATE DESC Time : 11:56:56 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 'DISPATCHDATE BETWEEN 06/05/2016 AND 12/08/2016 order by DISPATCHDATE DESC' at line 1 Raw SQL : select count(DISPATCHREGISTERID) as totalnew_parties from dispatchregister as ab,partydetail as p where p.PARTYID=ab.FIRMNAME DISPATCHDATE BETWEEN 06/05/2016 AND 12/08/2016 order by DISPATCHDATE DESC Time : 11:53: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 ''05/02/2016' BETWEEN '01/01/2017' order by DISPATCHDATE DESC' at line 1 Raw SQL : select count(DISPATCHREGISTERID) as totalnew_parties from dispatchregister as ab,partydetail as p where p.PARTYID=ab.FIRMNAME and DISPATCHREGISTERID=18296 AND DISPATCHDATE '05/02/2016' BETWEEN '01/01/2017' order by DISPATCHDATE DESC Time : 11:13: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 'where BUSINESSTYPE=62' at line 1 Raw SQL : select PARTYID,NAME,PARTYCODE where BUSINESSTYPE=62 Time : 09:41:16 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 PARTYCODE,PARTYID,partydetail.NAME,ADD1,ADD2,CITY,STATE,PINCODE from partydetail,contact where PARTY=PARTYID and addresstype='Billing Address' and PARTYID= Time : 08:05:16 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 '=='NULL'' at line 1 Raw SQL : select SUM(amount) as amnt from dispatchregister where amount>0 and COURRIERNAME=='NULL'