Sql problem
in
Contributed Library Questions
•
1 year ago
Hi,
would like to ask if anyone knows a way to insert special characters in mysql?
below is the code,
msql.execute("INSERT INTO testing (message) VALUES ('"+msg+"');" );
There will be error occur when i insert a message that contains character like ', ", and ; i know these got to do with sql injection but i don't want to remove those special character, and would like to insert the message to the database the way it is.
hope you guys can help. Thx.
1