Raised This Month: $ Target: $400
 0% 

Whats wrong with this SQL query?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shauli
Member
Join Date: Jun 2018
Old 06-15-2018 , 07:25   Re: Whats wrong with this SQL query?
Reply With Quote #1

Quote:
Originally Posted by jonatat View Post
Ok really weird. Not working + 1 syntax, not code. I tried like that:

PHP Code:
formatexszQuery999"UPDATE `users` SET `MVP` = '1' WHERE steam_id = '%s';"MVPsteamid); 
SQL_ThreadQueryg_hTuple"QuerySetData"szQuery);

formatexszQuery999"UPDATE `users` SET `MLP` = '1' WHERE steam_id = '%s';"MLPsteamid); 
SQL_ThreadQueryg_hTuple"QuerySetData"szQuery);

formatexszQuery999"UPDATE `matches` SET `MVP_steamid` = '%s', `MLP_steamid` = '%s' WHERE match_id = '%s';"MVPsteamidMLPsteamidszLine); 
SQL_ThreadQueryg_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:
formatexszQuery999"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.
shauli is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode