Time : 09:46:08 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 DISPATCHDATE DESC' at line 1 Raw SQL : select count(DISPATCHREGISTERID) as totalnew_parties from dispatchregister as ab,partydetail as p,(select PARTY as prty,CITY,addresstype from contact group by PARTY) as c where p.PARTYID=ab.FIRMNAME and p.PARTYID=c.prty and DISPATCHNO='20-21/0233' and PARTYCODE= order by DISPATCHDATE DESC Time : 06:31:37 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:31:37 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 : 02:47: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 : 02:47: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 : 02:40: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 : 02:40:28 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=