Keep in mind that it is not a ood idea to get (not sure how to get the last value for auto_increment column) last id with a statement like "SHOW TABLE STATUS". Because this will return allways the some for different connections which might create problems for you. My point is. last_insert_id() returns the ID generated last according to the connecttion you used. For example if you make two different connections and insert two different records you will NOT get the same last_insert_id() value.. But at your case they will be probably the same..
Best Regards, Cemal Dalar a.k.a Jimmy System Administrator & Web Developer http://www.dalar.net ----- Original Message ----- From: "Naresh Sadhnani" <[EMAIL PROTECTED]> To: "Rhino" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, August 12, 2004 3:35 PM Subject: RE: Auto Increment Column Well actually I want it in a stored procedure. However due to a bug in version 5.0.0 alpha (posted on the bugs database by me ID 5017) I cannot get the LAST_INSERT_ID() in the stored procedures. So I want an alternate way of getting LAST_INSERT_ID(). I thought auto_increment column of SHOW table status should get me that... However it is proving difficult as well. I even tried using MAX on the table which also has a bug when called from a stored procedure (I have not reported this as yet). So any ideas? Cheers Naresh -----Original Message----- From: Rhino [mailto:[EMAIL PROTECTED] Sent: 12 August 2004 13:25 To: Naresh Sadhnani; [EMAIL PROTECTED] Subject: Re: Auto Increment Column | Subject: Auto Increment Column | | Hi, | | Does anyone know how to extract only the Auto_Increment column from | the command results of "SHOW TABLE STATUS" Do you mean that you want a command that will run on the command line that will show the value of the Auto_Increment column? Or are you trying to determine how to read the value via programming statements in an application? If you prefer the latter, what programming language are you using? Rhino -- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the originator of the message. This footer also confirms that this email message has been scanned for the presence of computer viruses. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of DA Group. ---------------------------------------------------------------------------- ---- > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]