last id - 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)
+--- Thread: last id (
/showthread.php?tid=481588)
last id -
speed258 - 16.12.2013
Hello is possible to get from mysql last id by using SELECT? if yes so how code should look like?
Re: last id -
speed258 - 16.12.2013
Post UP.
Re: last id -
Jefff - 16.12.2013
SELECT * FROM `table`
mysql_num_rows is last id
or
SELECT MAX(ID) FROM `table`
Re: last id -
Vince - 16.12.2013
I assume you want to know this to insert new stuff into the table, in which case you should use auto_increment and mysql_insert_id().
Re: last id -
speed258 - 17.12.2013
Quote:
Originally Posted by Vince
I assume you want to know this to insert new stuff into the table, in which case you should use auto_increment and mysql_insert_id().
|
actually i dont want use INSERT funcktion because i just insert empty parametres, so i just need use SELECT and get last id from table.