Edwardlol Posted February 21, 2013 Posted February 21, 2013 I'm having a problem with this: input .@amigo1$; query_sql "SELECT online FROM `char` WHERE name = " +.@amigo1$,.@amigo1[0]; The script load without problems but when I test it and for example write "test" in .@amigo1$ it happen: http://imageshack.us/photo/my-images/10/sinttulokui.png/ I hope you can help :/ Quote
Edwardlol Posted February 21, 2013 Author Posted February 21, 2013 (edited) That send me a db bug when I write "test" in to the input. http://imageshack.us/photo/my-images/547/sinttuloqlp.png/ input .@amigo1$; query_sql "SELECT online FROM `char` WHERE `name` = "+.@amigo1$,.@amigo1[0]; And I have that. EDIT: I put query_sql "SELECT online FROM `char` WHERE `name` = "+"'"+.@amigo1$+"'",.@amigo1[0]; And then it work, very thank you Edited February 21, 2013 by Edwardlol Quote
goddameit Posted February 21, 2013 Posted February 21, 2013 `name` is char style, you need to make searching like this `name` = '<string>' Quote
Edwardlol Posted February 21, 2013 Author Posted February 21, 2013 (edited) I don't understand it :/ Can you make a example with my data? I put query_sql "SELECT online FROM `char` WHERE `name` = " +.@amigo1$,.@amigo1[0]; and still got the same error. Edited February 21, 2013 by Edwardlol Quote
Edwardlol Posted February 21, 2013 Author Posted February 21, 2013 `name` = 'test' I can't type '.@amigo1$' :/ Quote
goddameit Posted February 21, 2013 Posted February 21, 2013 (edited) are your player named ".@amigo1$"?you said he is "test" in #1 Edited February 21, 2013 by goddameit Quote
Edwardlol Posted February 21, 2013 Author Posted February 21, 2013 (edited) There is a input .@amigo1$; I want to SELECT that variable in to my query_sql Edited February 21, 2013 by Edwardlol Quote
goddameit Posted February 21, 2013 Posted February 21, 2013 (edited) so? problem in where? I said you need to make searching like this `name` = '<string>' if you don't know how to insert variable, read how you did in #1 WHERE name = " +.@amigo1$ Edited February 21, 2013 by goddameit Quote
Question
Edwardlol
I'm having a problem with this:
The script load without problems but when I test it and for example write "test" in .@amigo1$ it happen:
http://imageshack.us/photo/my-images/10/sinttulokui.png/
I hope you can help :/
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.