28.02.2015, 14:21
I have a function that I wrote whilst using an older version of MySQL, but now I've updated to R39-2, I can't figure out how to convert this function:
I need to count the amount of Goldpots in the MySQL table, but when I tried to convert to the newer functions of MySQL R33+, it always counted 0 goldpots which is wrong. I don't understand how to fetch the amount of rows in the "goldpots" table as an integer, like I've done above with mysql_fetch_int().
pawn Код:
format(query2, sizeof(query2), "SELECT `id` FROM `goldpots` ORDER BY `id` DESC LIMIT 1");
mysql_query(query2);
mysql_store_result();
MAXGOLDPOTS = mysql_fetch_int();
mysql_free_result();