Thread: database insert question
11-21-04, 14:20 #1Registered User
- Join Date
- Jan 2004
Unanswered: database insert question
I have a form asking where a user inputs a numerical
value into a text box. The form posts the name/value to the same page.
The first form drives a second form, which dynamically
creates table rows based on the value that was entered in the text field in
the first form.
I'm using a loop to create the table rows and increment each row by 1
through each pass for the field names. Each row will correspond to a new
record in a database table. So, "year1", "stategy1", "BO1", "BA1",
"origBA1" and "IncrDecr1" would insert as a record, then the next row,
I'm lost on how to fire the insert for each new row into the database?
Here is a URL to see how the form works:
Thanks for any help!
11-22-04, 12:42 #2Useless...
- Join Date
- Jul 2003
Why do you have to append a number to the value? Why don't you simply have a column for sequence number, and put the iteration value in there?
As for looping through the rows, I looked at the page, and I'm not sure where the data is that you're trying to loop through. But I suppose all you'd need to do is have a while, do/while, or for loop and have multiple insert statements.
Could you clarify what you're trying to accomplish?That which does not kill me postpones the inevitable.