Re: Multiple insert question

From: Date: Mon, 11 Sep 2000 23:37:18 +0000
Subject: Re: Multiple insert question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-16252@lists.php.net to get a copy of this message
MySQL does not appear to support table joins for inserts, deletes, or updates. Only selects. These features will supposedly be added in 3.24 (long from now) in the meantime, I think you will have to make do with multiple queries. On Mon, 11 Sep 2000, PHPlist wrote: > I have a MySQL database that I am pulling information from. I have one > table that I am pulling a list of names. I would like to insert the names > plus other information into a different table. The problem is that the > values for the name will be different but the information I am adding will > have the same variable name for each name. Here is a visual: > > name1 value1 value2 value3 value4 value5 > name2 value1 value2 value3 value4 value5 > name3 value1 value2 value3 value4 value5 > name4 value1 value2 value3 value4 value5 > name5 value1 value2 value3 value4 value5 > > So my problem is that I have 5 different variable names for each name#. > Each name# and associated values will be a row in the new table. How do I > insert all five "rows" at one time? Would I just do 5 different insert > statements? One for each "row"? Won't the values for the variables be > overwritten on each row? > > Are there any relatively easy ways to accomplish this? I'm your basic > newbie... > > My brain is starting to leak....I need some help... > > TIA > Scott > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#16252) next »