[Zope-DB] multiple record update.
Wed, 25 Sep 2002 19:03:32 +0000
This seems like a simple enough task but I can't seem to wrap my brain
I have a form with 80 input fields. The form has one unique field named
record_id. Every other field name is "fieldName" + integer_id. When I submit
the form I want to use the "record_id", the field name's integer_id, and the
field value to update a row.
The table basically looks like this
RecordID | Field_ID | Field_Value
So the procedure I'm thinking in my head is the form is submitted. A method
creates an object from the request by setting the record_id, splitting the
field name and setting the field_id to the integer value, then setting the
field_value to the field value. Then I loop through each item in the object
and call an insert sql statement.
The problem is I can't seem to figure out how to do it. I've seen a couple
of examples of doing something similar but they didn't fit exactly what I am
doing and when I attempted to modify them to fit, it fails. I can't seem to
find any information about how to get a field name out of the request or how
"split" works. I'm lost anyone want to draw me a map. Crayons work nicely.
Join the world’s largest e-mail service with MSN Hotmail.