last id
#1

Hello is possible to get from mysql last id by using SELECT? if yes so how code should look like?
Reply
#2

Post UP.
Reply
#3

SELECT * FROM `table`
mysql_num_rows is last id

or

SELECT MAX(ID) FROM `table`
Reply
#4

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().
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)