Hi I've mysql database and I wish to obtain the last ID from area inside a table .

example : -

id   Value
1    david
2    jone
3    chris

I would like a function return 3 if the table exist .

Choose MAX(id) FROM table

SELECT id
FROM table
ORDER BY id DESC
LIMIT 1

If you wish to choose the ID of the very lately placed row inside a table by having an AUTO_INCREMENT column, you'll likey want to consider MySQL's LAST_INSERT_ID function.