mysql | with MAX function. - 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 | with MAX function. (
/showthread.php?tid=268887)
mysql | with MAX function. -
EviLpRo - 14.07.2011
hello !
I did so with MAX function:
pawn Код:
new Props;
mysql_query("SELECT MAX(`ID`) FROM `Props`");
mysql_store_result();
if(mysql_retrieve_row()) Props = mysql_fetch_int();
mysql_free_result();
It always returns zero, what's the problem?
Thanks in advance helpers!
Re: mysql | with MAX function. -
Vince - 14.07.2011
Try using
mysql_num_rows instead of
mysql_retrieve_row.
Re: mysql | with MAX function. -
EviLpRo - 14.07.2011
what ?
i did not understand
You can just fix my code?