[MySQL] How to use the mysql_fetch_field_row to float?
#2

If you select only one field which is float or integer ("SELECT float WHERE blabla" or "SELECT number WHERE blabla") you do it like this:

pawn Код:
mysql_query("SELECT somefloat WHERE me='Im cool');
mysql_store_result();

new integer = mysql_fetch_int();

new Float:float
mysql_fetch_float(float)

mysql_free_result();
However if you select more fileds and you want to extract floats use floatstr, if you want to extract integers use strval. You can also use sscanf insteaf of strval or floatstr.


And next time post in plugin's topic instead of making new one.
Reply


Messages In This Thread
[MySQL] How to use the mysql_fetch_field_row to float? - by bskillerbr - 04.11.2009, 13:32
Re: [MySQL] How to use the mysql_fetch_field_row to float? - by Sergei - 04.11.2009, 14:17

Forum Jump:


Users browsing this thread: 1 Guest(s)