Best way to get value of autoincriment after inserting NULL?

2003-12-15 Thread Paul Fine
Greetinsg. If I have a table like with a column being the PK for the table and being an Auto Increment value, what is the best way to return this value to my script? It is possible that additional rows may have been added during the small wait. Ie. Col 1 Col 2 Col 3

Re: Best way to get value of autoincriment after inserting NULL?

2003-12-15 Thread Aleksandar Bradaric
Hi, I imagine there has to be a better way! Yes :) Take a look at the LAST_INSERT_ID() function. Take care, Aleksandar -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Best way to get value of autoincriment after inserting NULL?

2003-12-15 Thread jeffrey_n_Dyke
] net Subject: Re: Best way to get value of autoincriment after inserting NULL? 12/15/2003 01:13

Re: Best way to get value of autoincriment after inserting NULL?

2003-12-15 Thread Tobias Asplund
On Mon, 15 Dec 2003, Paul Fine wrote: If I have a table like with a column being the PK for the table and being an Auto Increment value, what is the best way to return this value to my script? If you insert a row LAST_INSERT_ID() will return the primary key value in this setup. The other way

RE: Best way to get value of autoincriment after inserting NULL?

2003-12-15 Thread Paul Fine
, December 15, 2003 12:56 PM To: Paul Fine Cc: [EMAIL PROTECTED] Subject: Re: Best way to get value of autoincriment after inserting NULL? On Mon, 15 Dec 2003, Paul Fine wrote: If I have a table like with a column being the PK for the table and being an Auto Increment value, what is the best way

Re: Best way to get value of autoincriment after inserting NULL?

2003-12-15 Thread harm
- From: Tobias Asplund [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 12:56 PM To: Paul Fine Cc: [EMAIL PROTECTED] Subject: Re: Best way to get value of autoincriment after inserting NULL? On Mon, 15 Dec 2003, Paul Fine wrote: If I have a table like with a column being

Re: Best way to get value of autoincriment after inserting NULL?

2003-12-15 Thread Curtis Maurand
select last_insert_id(); or in php use the mysql_insert_id() eg: $somevalue = mysql_insert_id(); print (The last auto incremented number was: $somevaluebr\n); Cheers Curtis Paul Fine said: Greetinsg. If I have a table like with a column being the PK for the table and being an Auto