Handle Quotes In MySQL Query Using Zend Framework

When a value that needs to be inserted into database, contains a mix of   ‘ and ”  , problem will arise with normal MySQL query. We can handle the situation when using plain PHP with this solution. But if we are using Zend Framework the solution will be – $db = Zend_Db::factory(‘PDO_MYSQL’, $params);$sql =… Continue reading Handle Quotes In MySQL Query Using Zend Framework

MySQL single and double quotes insertion

More than often while inserting some description into MySQL from a form input one faces a ‘single and double quote’ problem. For example while inserting the following text – I have both ‘ and ” quotes in my description To make the text safe for a MySQL insertion parse it with mysql_real_escape_string() That would make… Continue reading MySQL single and double quotes insertion