Jump to content

Archived

This topic is now archived and is closed to further replies.

chico1st

Finding ID of value entered

Recommended Posts

Hey i was wondering if there is a way to know the ID (auto_assigned primary key) of a value you just input.
The only way I can think of... [i]unless there is a command.[/i].. is to just go through the whole table and note the very last ID.
Any help would be great!
THANKS!

Share this post


Link to post
Share on other sites
http://ca.php.net/manual/en/function.mysql-insert-id.php

Share this post


Link to post
Share on other sites
That is, "SELECT LAST_INSERT_ID()".

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.