Syntactic Confectionery Delight | |
PerlMonks |
Re: Re: Logical question-to upate DB recordsby thisisperl (Novice) |
on Jun 01, 2004 at 21:20 UTC ( [id://358621]=note: print w/replies, xml ) | Need Help?? |
Thanks. Yeah I already made changes similar to the ones you suggested-I have modified the design now and have multiple checkboxes and a single Update button. The changes I made: -I am now using CGI to retrieve "arrays of values" -The form now has an update column with check boxes and a single update button for all rows. -The value of update check box is set to TicketNo, which is my primary autonumber key so the value tells me which records need to be updated: In the template:
So the template will display records returned from the DB-the user can modify the fields displayed in a text box. (mulitple modifiable fields per record) In the script:
Sample output is: @update prints 40001 40003 40006 40007 @detail prints detail1 detail2 detail3 detail4 detail5 detail6 detail7 The question now: Given two arrays of different lengths, I cannot use the same array index to access corresponding elements from the two arrays. So how do I associate the right elements (40003 with detail3 and not detail 2)?
In Section
Seekers of Perl Wisdom
|
|