I have a small problem with a lua script and im using a query.
Code: [Select]
os.execute("mysql -u root -ppassword --execute='UPDATE user.users SET email = "..email .." WHERE id = ".. get_email() ..";'")
So, the problem is, if i type numbers as the email e.g "2134124412" the query is success and change the email to "2134124412".
If i type characters like "qwertz" i got a sql problem.
I saw, at
Code: [Select]
SET email = "..email.."
the " " do not escape, because every SET xy = xy statemant needs two ' ' to escape the string.
So, how i can do this, because i start the command with two " ", in the command a execute command with two ' ' and now i need two ' ' or two " " again at the SET email step?
Code: [Select]
os.execute("mysql -u root -ppassword --execute='UPDATE user.users SET email = "..email .." WHERE id = ".. get_email() ..";'")
So, the problem is, if i type numbers as the email e.g "2134124412" the query is success and change the email to "2134124412".
If i type characters like "qwertz" i got a sql problem.
I saw, at
Code: [Select]
SET email = "..email.."
the " " do not escape, because every SET xy = xy statemant needs two ' ' to escape the string.
So, how i can do this, because i start the command with two " ", in the command a execute command with two ' ' and now i need two ' ' or two " " again at the SET email step?