Time : 23: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 : 13:09:48 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 's Enterprises' and ADD1='5, B.N. Road,'' at line 1 Raw SQL : select PARTYID from partydetail,contact where PARTYID=PARTY and CITY=1324 and NAME='Neelam's Enterprises' and ADD1='5, B.N. Road,' Time : 12:58:51 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 's Enterprises' and ADD1='5, B.N. Road,'' at line 1 Raw SQL : select PARTYID from partydetail,contact where PARTYID=PARTY and CITY=1324 and NAME='Neelam's Enterprises' and ADD1='5, B.N. Road,'