Multiple insert question
| From: | PHPlist | Date: | Mon, 11 Sep 2000 22:49:31 +0000 |
| Subject: | Multiple insert question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-16249@lists.php.net to get a copy of this message | ||
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