Hi Gordon

After inserting into the First table, After success Insertion there is a
seperate function in mysql,mysq_insert_id(), This is will get the last
insert id from the first table.

thx and regards

Anilkumar

On 5/20/06, Gordon Stewart <[EMAIL PROTECTED]> wrote:
>
>  I've got 2 tables in a databse, which I want to update at the same
> time...
>
> In one table, I have an "ID" field, which is UNIQUE...
>
> I know that if I add the record with a '' (null) information for the
> ID, then the ID field will be numbered with a new ID..
>
> however, I need to add information to the second table, which includes
> the same "new" ID as in the 1st table...
>
> Apart from doing a new 'select' query - Is there a quick way of
> identifying the new ID number, & updating the 2nd table at the same
> time ?
>
>
> --
> G
> Yahoo Archives by email = Yes
> http://groups.kwister.com/owners.php#add
> NZ community groups - [EMAIL PROTECTED]
>
>
> Community email addresses:
>   Post message: [email protected]
>   Subscribe:    [EMAIL PROTECTED]
>   Unsubscribe:  [EMAIL PROTECTED]
>   List owner:   [EMAIL PROTECTED]
>
> Shortcut URL to this page:
>   http://groups.yahoo.com/group/php-list
>
>
>
> SPONSORED LINKS
>   Php mysql<http://groups.yahoo.com/gads?t=ms&k=Php+mysql&w1=Php+mysql&w2=Job+postings&c=2&s=33&.sig=FLGkJVBUdDMln4PBO26sng> Job
> postings<http://groups.yahoo.com/gads?t=ms&k=Job+postings&w1=Php+mysql&w2=Job+postings&c=2&s=33&.sig=cV3rp9pSpCxahJy7imon_w>
>  ------------------------------
> YAHOO! GROUPS LINKS
>
>
>    -  Visit your group "php-list<http://groups.yahoo.com/group/php-list>"
>    on the web.
>
>    -  To unsubscribe from this group, send an email to:
>     [EMAIL PROTECTED]<[EMAIL PROTECTED]>
>
>    -  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>    Service <http://docs.yahoo.com/info/terms/>.
>
>
>  ------------------------------
>


[Non-text portions of this message have been removed]





Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list




SPONSORED LINKS
Php mysql Job postings


YAHOO! GROUPS LINKS




Reply via email to