List:General Discussion« Previous MessageNext Message »
From:Richard Davey Date:March 17 2004 3:44am
Subject:Re[2]: PHP and using mysql_last_id()
View as plain text  
Hello Lorderon,

Wednesday, March 17, 2004, 3:39:35 AM, you wrote:

L> It is better run a query with:
L>     SELECT LAST_INSERT_ID();
L> immediately after making the insert query. that way you'll get the exact
L> ID..

Why?

What difference does that give between using the PHP function that
returns the last ID - other than the fact it takes another query on
the database?

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html


Thread
ORACLE to MySQL migrationEnrico.Venturi16 Mar
  • Re: ORACLE to MySQL migrationKaram Chand16 Mar
RE: ORACLE to MySQL migrationWalt Weaver16 Mar
  • PHP and using mysql_last_id()sgannon6016 Mar
    • Re: PHP and using mysql_last_id()Alex croes16 Mar
Re: PHP and using mysql_last_id()jeffrey_n_Dyke16 Mar
  • RE: PHP and using mysql_last_id()Elly Wisata17 Mar
  • Re: PHP and using mysql_last_id()Lorderon17 Mar
    • Re[2]: PHP and using mysql_last_id()Richard Davey17 Mar
RE: ORACLE to MySQL migrationDChristensen17 Mar
  • XML to MySQLBoyd E. Hemphill17 Mar