[Help] Commands out of sync; you can't run this command now
#1

Код:
[11:54:13] >> mysql_query( Connection handle: 1 )

[11:54:13] CMySQLHandler::Query(UPDATE aacoutsername SET playerAmmoSpa ='500' WHERE playerID ='11223') - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[11:54:13] >> mysql_query( Connection handle: 1 )

[11:54:13] CMySQLHandler::Query(UPDATE aacoutsername SET playerAmmoFir ='0' WHERE playerID ='11223') - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[11:54:13] >> mysql_query( Connection handle: 1 )

[11:54:13] CMySQLHandler::Query(UPDATE aacoutsername SET playerCharge1 ='54' WHERE playerID ='11223') - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)
code

Код:
new szQueryOutput[256];

		format(szQueryOutput, sizeof(szQueryOutput), "UPDATE aacoutsername SET playerAmmoSpa ='%d' WHERE playerID ='%d'", playerVariables[playerid][pAmmoSpray], playerVariables[playerid][pInternalID]);
		mysql_query(szQueryOutput);
		format(szQueryOutput, sizeof(szQueryOutput), "UPDATE aacoutsername SET playerAmmoFir ='%d' WHERE playerID ='%d'", playerVariables[playerid][pAmmoFire], playerVariables[playerid][pInternalID]);
		mysql_query(szQueryOutput);
		format(szQueryOutput, sizeof(szQueryOutput), "UPDATE aacoutsername SET playerCharge1 ='%d' WHERE playerID ='%d'", playerVariables[playerid][pCharge][2], playerVariables[playerid][pInternalID]);
		mysql_query(szQueryOutput);
		format(szQueryOutput, sizeof(szQueryOutput), "UPDATE aacoutsername SET playerCharge2 ='%d' WHERE playerID ='%d'", playerVariables[playerid][pCharge][3], playerVariables[playerid][pInternalID]);
		mysql_query(szQueryOutput);

.
.
.
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=196441

Use the search button my friend, you didn't free the result.

And please..Step over to threaded queries these are way faster.
Reply
#3

free the result

Use this function to store result after using SELECT, SHOW, DESCRIBE, EXPLAIN or CHECK TABLE query ?

but I'm UPDATE
Reply
#4

Quote:
Originally Posted by bigtigerbeee
Посмотреть сообщение
free the result

Use this function to store result after using SELECT, SHOW, DESCRIBE, EXPLAIN or CHECK TABLE query ?

but I'm UPDATE
Why are you sending 4 different query's when you can do it with one?
Reply
#5

coz can't input long query in mysql

Here > https://sampforum.blast.hk/showthread.php?tid=487234
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)