[Gambas-user] MySQL Data

Eric Damron edamron at ...776...
Sat Jan 22 06:34:12 CET 2005


I'm writing a simple DVD collection database front end to MySQL in order 
to learn Gambas. I've noticed that when the user enters a title like 
"Hogan's Heros" an exception is thrown because of the apostrophe. I 
fixed this problem by sending all user inputs to a function that looks 
for this and returns “\'” when it finds one.

However, if the user enters a “&” the same thing happens even if I 
convert it to “\&” Does anyone know how to properly “sanitize” user 
input to MySQL?

Thanks.




More information about the User mailing list