MySQL Floats
#3

for fetching float values you must declare the enumerators X,Y and Z as float or Double depending Upon the precision of decimal points. Also for fetching float or double values from MySQL, you need to use mysql_fetch_float() function. otherwise, the decimal point values wont be loaded properly to the variables

Like this as an example

format(playerQuery, sizeof(playerQuery), "SELECT X FROM `tablename` LIMIT 1 ");
mysql_query(playerQuery);
mysql_store_result();
mysql_fetch_float(Doors[l][X]);
mysql_free_result();
Reply


Messages In This Thread
MySQL Floats - by SKAzini - 28.02.2013, 13:37
Re: MySQL Floats - by Brokenbreaken - 28.02.2013, 13:41
Re: MySQL Floats - by Height - 28.02.2013, 13:50
Re: MySQL Floats - by SKAzini - 28.02.2013, 14:40

Forum Jump:


Users browsing this thread: 2 Guest(s)