Small SQL problem
#3

Don't use "%s" for a player's name, always use %e to prevent mysql injections.
If a player would enter a name like
PHP код:
";DROP TABLE players;" 
, your database is gone without warning if you use %s for user-inputted text.

As for the problem, %i or %d would be fine as Harrison said, without the ' around it.
You only need to use a value between ' when it's a string.
Reply


Messages In This Thread
Small SQL problem - by TwinkiDaBoss - 07.01.2016, 21:09
Re: Small SQL problem - by HarrisonC - 07.01.2016, 21:22
Re: Small SQL problem - by AmigaBlizzard - 07.01.2016, 22:22
Re: Small SQL problem - by HarrisonC - 07.01.2016, 23:41
Re: Small SQL problem - by TwinkiDaBoss - 08.01.2016, 22:26

Forum Jump:


Users browsing this thread: 1 Guest(s)