PDA

View Full Version : Which characters should be escaped?



Mistrel
12-03-2006, 07:02 PM
I'm submitting a concatenated query with multiple plain text values. I'm already expecting there to be a problem with text that includes a comma ( , ) but what other characters should I be certain are escaped?

Twey
12-03-2006, 07:52 PM
', ", and any non-ASCII values. Most languages with MySQL bindings will provide you with a function to safely escape a string.

djr33
12-04-2006, 07:53 AM
Also, backticks-- ```` (same key as ~)

Twey
12-04-2006, 04:22 PM
(same key as ~)Maybe on your keyboard.

djr33
12-04-2006, 10:42 PM
Twey, we've been over this... your keyboard is WEIRD :p
(It's the same key in the same position on every keyboard I can remember using and currently on the keyboard for various PCs that I have, my PC laptop and my MAC desktop.)

Twey
12-05-2006, 05:00 PM
Only American keyboards. English keyboards, German keyboards and French keyboards are different, I believe; I strongly suspect that just about every other keyboard in the world probably is too. :)