use the LAST_INSERT_ID() sql function

On Fri, 4 Jan 2002 11:32:19 +0800, Arvin Bautista used a few recycled electrons
to form:

| I had 2 tables, the second table had a field (a key field) that is related
| to the field of the first table
| 
|         first table                                    second table
| __________________            ____________________
| : client_id : client_name :            : client_id :   services :
| __________________            _____________________
| 
| I'm trying to normalize the database. "client_id" field from first table is
| incremental (autoincrement). Now i need some advice how can i Insert record
| to the second table that it can have the same value that the first table
| "client_id" assigned by the autoincrement.  Is there an easy way to do it
| 
| Thank You in advance
| 
| Arvin
| 
| 
| 
| 
| ---------------------------------------------------------------------
| 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