SA-MP Forums Archive
Weird MySQL issue !! - 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: Weird MySQL issue !! (/showthread.php?tid=342664)



Weird MySQL issue !! - Michael@Belgium - 14.05.2012

FIXED ! IT WAS A SSCANF ISSUE !


Re: Weird MySQL issue !! - Mandrakke - 14.05.2012

do never use SELECT *, because if you have an large number of columns into your table, the plugin will mess the data while storing it into variables.

select only the fields you will use in the code and see if this problem keeps ocurring, but keep in mind that it is only a hint for the problem solution, I don't know if the problem is related to the data storage, I am just telling you how I solve an problem similar to this one.


Re: Weird MySQL issue !! - Michael@Belgium - 14.05.2012

Quote:
Originally Posted by Mandrakke
Посмотреть сообщение
do never use SELECT *, because if you have an large number of columns into your table, the plugin will mess the data while storing it into variables.

select only the fields you will use in the code and see if this problem keeps ocurring, but keep in mind that it is only a hint for the problem solution, I don't know if the problem is related to the data storage, I am just telling you how I solve an problem similar to this one.
I know as owner that he selects not more then 20 rows, because there are each 20 cars in each map.


Re: Weird MySQL issue !! - Mandrakke - 14.05.2012

The problem has not to do with rows returned, it is an cols number issue, no matter how many rows the query returns.

just make a test, tests usually don't bite;
Код:
SELECT model, Xpos, Ypos, Zpos, Apos, Col1, Col2, Delay FROM `Car_MapSubmits` WHERE MapName = '%s'