Mysql Fetch Problem.
#1

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.
Reply
#2

Added Inform
Reply
#3

Use mysql_fetch_row

Bas
Reply
#4

Explain to me.
Reply
#5

is HouseCoordsX a float?
Reply
#6

Yes it is a float.
Reply
#7

Replace mysql_fetch_float by mysql_fetch_row, that's all. It should work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)