Mysql Fetch Problem. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Mysql Fetch Problem. (
/showthread.php?tid=188658)
Mysql Fetch Problem. -
Kyle - 08.11.2010
I've got this code:
pawn Код:
format(query, 256, "SELECT House-CoordsX FROM houses WHERE House-ID = '%d'", HouseID2);
mysql_query(query);
mysql_store_result();
mysql_fetch_float(HouseFloats[HouseID2][HouseCoordsX]);
The problem is that the varible:
HouseFloats[HouseID2][HouseCoordsX];
Gives me 0.000. It looks like the problem is the query although its correct. I dont know whats up with it.
Re: Mysql Fetch Problem. -
Kyle - 08.11.2010
Added Inform
Re: Mysql Fetch Problem. -
baske007 - 08.11.2010
Use mysql_fetch_row
Bas
Re: Mysql Fetch Problem. -
Kyle - 08.11.2010
Explain to me.
Re: Mysql Fetch Problem. -
legho - 08.11.2010
is HouseCoordsX a float?
Re: Mysql Fetch Problem. -
Kyle - 08.11.2010
Yes it is a float.
Re: Mysql Fetch Problem. -
baske007 - 08.11.2010
Replace mysql_fetch_float by mysql_fetch_row, that's all. It should work.