SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: mysql escape characters
-
May 9, 2009, 10:33 #1
mysql escape characters
I need to insert a text into a Mysql table.The text contains ',";
So I tried mysql_escape_string or mysql_real_escape_string functions.
The problems is with this type of string,for example:Code:Nancy's dog
Code:Nancy\'s dog
I have :
# MySQL 5.1.33
# PHP 5.2.9
-
May 9, 2009, 11:50 #2
- Join Date
- Mar 2002
- Location
- Bristol, UK
- Posts
- 2,240
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Can you post the exact query and the error?
-
May 9, 2009, 12:18 #3
- Join Date
- Feb 2008
- Location
- end($world)
- Posts
- 834
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Seems like you are applying addslashes() to the string before you insert it in the database but that's just my guess.
We need to see the code or else we probably can't help you.
Bookmarks