Is there a way to get the index number of an entry that was just entered into a table when it is set onto auto_increment. Usualy I have to query the db with a select statement just to find out what he last unique id number was.

I heard something about a function that automaticly spits it our for u.. is this true?