SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
Feb 8, 2009, 07:02 #1
- Join Date
- Feb 2009
- Posts
- 2
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Backslash not escaping apostrophe?
not sure what's happening but i keep receiving the following error:
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 'Alba,12192 Vilafames,12183 Vilanova D'Alcolea,12162 Vilar De Canes,12124 Villahe' at line 1
which relates to this:
'12194 Vall D\'Alba', '12192 Vilafames', '12183 Vilanova D\'Alcolea', '12162 Vilar De Canes', '12124 Villahermosa Del Rio', '12500 Vinaros', '12135 Vistabella Del Maestrazgo');
if i remove the backslash and apostrophe before Alba and Alcolea then there is no error. so it appears (to this newbie) that the backslash is not escaping the apostrophe?
if anyone has any ideas it would be appreciated
-
Feb 8, 2009, 08:09 #2
-
Feb 8, 2009, 08:18 #3
- Join Date
- Feb 2009
- Posts
- 2
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
yes, i inserted the locations directly into mysql using backslash to escape the apostrophe. then i have a front end php site using javascript to input the locations - it's here i'm using backslash again to escape the apostrophe and receive the error
-
Feb 8, 2009, 16:45 #4
Bookmarks