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
Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/
---------------------------------------------------------------------
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