Philip Montgomery writes:
> I am overlooking something as for the code to update the user table. Maybe it would 
>help to make it more concrete.
> 
> Assume that I create two tables with the following statements:
> 
> CREATE TABLE system (
> sysid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
> sysname VARCHAR(12),
> os VARCHAR(10),
> cpumhz INT
> );
> 
> CREATE TABLE user (
> sysid INT REFERENCES system,
> username VARCHAR(30)
> );
> 
> 
> Also assume that I have inserted data into the system table as follows:
> 
> +-------+---------+-------+--------+
> | sysid | sysname | os    | cpumhz |
> +-------+---------+-------+--------+
> | 1     | system1 | Linux | 1000   |
> | 2     | system2 | Unix  | 350    |
> | 3     | system3 | Linux | 2000   |
> | 4     | system4 | Linux | 2000   |
> +-------+---------+-------+--------+
> 
> I want to associate John Doe with system1. How do I get mysql to extract the sysid 
>from the system table and then update the user table with the sysid and the username?
> 
> Thanks,
> 
> Phil
> 
> 

This feature is scheduled to come up in 4.0, which will be released
this Autumn.

-- 
Regards,
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
       <___/   www.mysql.com

---------------------------------------------------------------------
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