note 2360 deleted from function.addslashes by nlopess
| From: | nlopess@php.net | Date: | Sat, 24 Sep 2005 07:49:01 +0000 |
| Subject: | note 2360 deleted from function.addslashes by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-95681@lists.php.net to get a copy of this message | ||
Note Submitter: bruce dot j dot cadiz at boeing dot com
----
In ref. to note stating
"Using an oracle database addslashes doesn`t work to escape single quotes."<BR>
This is not successful when passed to ora_parse():<br>
http://www.php.net/manual/function.ora-parse.php3<p>
Another way to deal with this problem is to use stripslashes():
<br>
http://www.php.net/manual/function.stripslashes.php3
<br>function. PHP will try to "escape" single quotes on name
value pairs (POST or GET) <P>example: A query string is passed with single quotes
like<BR>
(SELECT * FROM EMP WHERE EMPNAME = 'SMITH')<BR><BR>
will be changed to<BR>
(SELECT * FROM EMP WHERE EMPNAME =\'SMITH\')<BR><BR>
stripslashes():<br>
http://www.php.net/manual/function.stripslashes.php3
<br> will fix this.
<BR>(ora_parse($curs,stripslashes($query)));