|
Author
|
Message
|
|
Member
|

06-15-2018
, 07:25
Re: Whats wrong with this SQL query?
|
#1
|
Quote:
Originally Posted by jonatat
Ok really weird. Not working + 1 syntax, not code. I tried like that:
PHP Code:
formatex( szQuery, 999, "UPDATE `users` SET `MVP` = '1' WHERE steam_id = '%s';", MVPsteamid);
SQL_ThreadQuery( g_hTuple, "QuerySetData", szQuery);
formatex( szQuery, 999, "UPDATE `users` SET `MLP` = '1' WHERE steam_id = '%s';", MLPsteamid);
SQL_ThreadQuery( g_hTuple, "QuerySetData", szQuery);
formatex( szQuery, 999, "UPDATE `matches` SET `MVP_steamid` = '%s', `MLP_steamid` = '%s' WHERE match_id = '%s';", MVPsteamid, MLPsteamid, szLine);
SQL_ThreadQuery( g_hTuple, "QuerySetData", szQuery);
log_amx(szQuery)
And works fint, just offcourse not counting +1. So where is mistake with + 1 ? Maybe try something like that? :
PHP Code:
formatex( szQuery, 999, "UPDATE `users` SET MLP = MLP + 1 WHERE steam_id = '%s';", MLPsteamid);
|
Yep, you wrote SET `MVP` = 'MVP + 1' instead of SET `MVP` = 'MVP' + '1' or SET `MVP` = MVP + 1.
|
|
|
|