Hello,

I'm having some trouble constructing my first INSERT statement into 
multiple tables.  I'm using PHP4.  I have written the following INSERT 
statement with no problems:

$sql = "INSERT INTO main (name, ext, stor_pre, stor_base, width, height, 
file_size, proj_id, date_cre, cre_by, division) VALUES ('$name', '$ext', 
'$stor_pre', '$stor_base', '$width', '$height', '$file_size', 
'$proj_id', '$date_cre', '$cre_by', '$division')";

This inserts the variables as values into the designated columns of the 
table "main".

But I have expanded my database, restructuring it so that it no longer 
uses one table ("main").  These various columns are now distributed 
across five different tables.  If I were to SELECT data from these 
tables, I would use a join statement.  How would I go about writing an 
INSERT statement that joins several different tables together?  Even a 
pointer to where I can find this info would be helpful.  The "INSERT 
syntax" page in the official documentation 
(http://www.mysql.com/doc/I/N/INSERT.html) doesn't address this specific 
circumstance, or if it does then I'm too dense to figure it out.

Thanks!


Erik


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