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

Jens Vagelpohl jens@zope.com
Mon, 22 Jul 2002 08:03:18 -0400

try the "missing" keyword on your dtml-vars:

<dtml-var mycheckboxvalue missing="N">


On Monday, July 22, 2002, at 07:35 , Thomas Weholt wrote:

> 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