Is there anything wrong with that query?
#1

Код:
	mysql_format(SQL, query, sizeof query, "UPDATE `users` SET `ip` = %s, `money` = %d, `admin` = %d, `vip` = %d, `vipdate` = %d, `world` = %d WHERE `id` = %d LIMIT 1", pInfo[playerid][IP], pInfo[playerid][Money], pInfo[playerid][Admin], pInfo[playerid][VIP], pInfo[playerid][VIPDate], pInfo[playerid][World], pInfo[playerid][ID]);
	mysql_tquery(SQL, query);
debug:
Код:
UPDATE `users` SET `ip` = 127.0.0.1, `money` = 0, `admin` = 0, `vip` = 0, `vipdate` = 0, `world` = 1 WHERE `id` = 17 LIMIT 1


It sets everything fine but world stays '0' for some reason.
Help?

EDIT: Noticed that error now. Ideas?
Код:
[plugins/mysql] error #1064 while executing query "UPDATE `users` SET `ip` = 127.0.0.1, `money` = 0, `admin` = 0, `vip` = 0, `vipdate` = 0, `world` = 1 WHERE `id` = 17 LIMIT 1": You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.0.1, `money` = 0, `admin` = 0, `vip` = 0, `vipdate` = 0, `world` = 1 WHERE `id`' at line 1
Reply


Messages In This Thread
Is there anything wrong with that query? - by ranme15 - 01.10.2016, 21:59
Re: Is there anything wrong with that query? - by Banditul18 - 01.10.2016, 22:40
Re: Is there anything wrong with that query? - by ranme15 - 01.10.2016, 23:43
Re: Is there anything wrong with that query? - by SickAttack - 01.10.2016, 23:49
Re: Is there anything wrong with that query? - by ranme15 - 02.10.2016, 00:01

Forum Jump:


Users browsing this thread: 1 Guest(s)