MySQL query problem
#1

pawn Код:
format(query,sizeof(query),"UPDATE items SET '%s' = %s + %d WHERE username = '%s'",Pasirinkimas,Pasirinkimas,Kiekis,Name);
                    mysql_function_query(dbHandle,query,false,"SendQuery","");
pawn Код:
[14:45:28] ProcessQueryThread(SendQuery) - Executing query UPDATE items SET 'Radio' = Radio + 1 WHERE username = 'Enrico_Mancini'...
[14:45:28] ProcessQueryThread(SendQuery) - Error will be triggered to OnQueryError().
The reason why i do it in this way, because I do not know what item will i have to set.
Reply
#2

bump
Reply
#3

Try this:
pawn Код:
UPDATE items SET `%s` = %s + %d WHERE username = '%s' ", \  
Pasirinkimas, Pasirinkimas,Kiekis,Name);
If that doesn't fix it, I'm sorry, try to explain your issue by elaborating more with proper English ^^, I cannot really help you as I have no idea what the fuck you're attempting to do and your variable names are not describing anything in proper English, originally, judging by your query, you want it to look like this.
pawn Код:
UPDATE items SET `Radio` = Radio + 1 WHERE username = 'user';
The only issue I'm seeing is the aphostrophes at the SET 'radio'
Reply
#4

You were right what i wanted, and you fixed what was wrong!
Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)