Hi,

You can use myswl_insert_id() to get it.

Here's a brief example:

$query = "INSERT INTO table_name VALUES ('', $value1, $value2)"; //  
First value is the autoincrement ID.
$result = mysql_query($query);
$latest_id = mysql_insert_id(); // Get last unique ID created.

Mark

------------------------------

On Oct 22, 2006, at 6:13 PM, edgardo catorce wrote:

Good day again guys!
May I know how to retrieve the last inserted
autoincrement ID in a mysql table? Thanks alot!


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


The php_mysql group is dedicated to learn more about the PHP/MySQL  
web database possibilities through group learning.
Yahoo! Groups Links







The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/php_mysql/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to