If you are unsure about using the mysql_insert_id, have PHP use a session
variable then do the following,

1.      On the insert command, use the session variable as the Name of the class.
2.      Retrieve the record with the session variable as the name.
3.      Update the record you just retrieve with the name of the class.
4.      Pass the ID of the record you just retrieve to the other Insert for the
Workshop table.

Hope this helps
Roger

-----Original Message-----
From: Michael T. Babcock [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 14, 2002 8:08 PM
To: Peter Lovatt
Cc: Steve Lefevre; [EMAIL PROTECTED]
Subject: Re: INSERT confirmation? PHP


Peter Lovatt wrote:

>mysql_insert_id
>should do it!
>
>

According to documentation somewhere, last insert can sometimes return a
different value than the most recent insert if the most recent insert
failed.

What is a better solution?

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to