Hello, Sandeep!

Friday, February 02, 2001, 08:43:41, you wrote:

SH> just a quick question. Say my script is inserting values into a
SH> database, which has an autoincremental id. Now I usually send out a
SH> mail also with the contents of the inserted stuff. The only problem
SH> is that of the ID field. How can I get the script to determine what
SH> id number was given to that row?
    for mysql there is a function called mysql_insert_id(). that
    function returns the ID generated for an AUTO_INCREMENT column by
    the previous INSERT query.

    try to dig documentation if you using another db.

Best regards!
Andrew Golovin
PGP Fingertip 24FD A0CD 667C 1FC7 C2F7  A2EA 9742 D484 FD3C 598D
http://exper.ural.ru/ 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to