Posts: 107
Threads: 34
Joined: Jun 2011
Reputation:
0
Hello is possible to get from mysql last id by using SELECT? if yes so how code should look like?
Posts: 2,593
Threads: 34
Joined: Dec 2007
SELECT * FROM `table`
mysql_num_rows is last id
or
SELECT MAX(ID) FROM `table`
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
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().