I am developing a web application using zend framework. For select statements I have used following way.
Ex:
public function getData($name) { $sql
I had the same problem and this solution works fine for me. I hope this will help. you can do something like this:
$quote_removed_name = str_replace("'","''",$name);
then write your query this way:
$sql = "SELECT * from customer where Customer_Name = '$quote_removed_name'";