as far as i know, you can only have one auto_increment field.  you'd have insert,
then grab the id and update that record, just like you've said.   make sure that
you grab the last assigned id using a valid method.  if it's a sign-up form, do
something like the following to make sure you are actually getting the last
assigned record for that specific user (you may have a heavy traffic site, so
just grabbing the last assigned id isn't wise):

SELECT NAME_OF_ID_FIELD from TABLE WHERE LAST_NAME='$LAST_NAME' AND
FIRST_NAME='$FIRST_NAME' AND PASSWORD='$PASSWORD' AND EMAIL='$EMAIL'

this would pretty much guarantee that you get the correct user profile.  I can't
think of any security issues, as you already have these variables filled at that
stage -- you're bring them in from the HTML form presumably.        Good luck
-Jim

Devi Annisetty wrote:

> Hi
>
> I need to insert the same auto increment value in 2 different tables
> simultaneously.
> I am new to the MySQL.Is there any function which helps for this type of
> manipulations?
> Or I need to store the value in host variable and update the tables with
> this host variable?
>
> Greatly appreciate you time and help
>
> Thanks and Regards
> Devi
>
> ---------------------------------------------------------------------
> 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