SA-MP Forums Archive
What's wrong with this (mysql)? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: What's wrong with this (mysql)? (/showthread.php?tid=441784)



What's wrong with this (mysql)? - Tanush123 - 04.06.2013

pawn Код:
format(query,sizeof(query),"UPDATE `PlayerDealership` SET `Owner` = '%s' WHERE `Owner` = '%s'",name,Nam);
mysql_query(query);
When i use it on my phpmyadmin it works probably. But on the server i get this from debug

Код:
[05:20:22] CMySQLHandler::Query(UPDATE `PlayerDealership` SET `Owner` = 'Yoloswag' WHERE `Owner` = 'Tan') - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)
[05:20:22] >> mysql_query( Connection handle: 1 )



Re: What's wrong with this (mysql)? - NvidiaForTheWin - 04.06.2013

i don't know to use mysql in samp , but i know how to use mysql in php

and your problem is that you are sending a query while the last one is still "active".

you have to call mysql_free_result ( is it implemented in mysql plugin ? )

if this is not the problem , i cannot help you much sorry


*EDIT*
seem like i was right

http://dev.mysql.com/doc/refman/5.0/...t-of-sync.html