[Zope] Problem: form-checkbox -> MySQL-table

Thomas Weholt t-weh@online.no
Mon, 22 Jul 2002 13:35:37 +0200


I got a MySQL-table with lots of "boolean"-values, in the form of
ENUM('Y',N'). In my webpage I got a bunch of checkboxes and I want to map
the checkboxes to the fields in the table. The problem is that a
checkbox-value is only available if the checkbox has been checked. I've
tried using <dtml-if fieldname> in my sql to check for the presence of a
checked checkbox, add it to the columns-list and value-list if present, but
I get an error " Error Value : 1136, "Column count doesn't match value count
at row 1". That would be ok, if I could just see the SQL-statement that
didn't work.

In short : how can I post a bunch of boolean-like values from a form to a
sql-method using MySQL?

Thanks in advance,
Thomas