[Zope-DB] Passing a list to a ZSQL method?
bryce at osdl.org
Tue May 18 20:37:22 EDT 2004
I have a table to insert records with arbitrary numbers of columns
into. To achieve this, I'd like to pass the ZSQL method a list object
and construct the SQL statement like...
INSERT INTO my_table (
param_<dtml-var sequence-item> <dtml-if expr="! sequence-end">,</dtml-if>
) VALUES (
<dtml-sqlvar name="record_uid" type="int">,
<dtml-var value> <dtml-if expr="! sequence-end">,</dtml-if>
Yet I'm getting a "Syntax Error at line 1" when I save this so I'm not
sure quite where I'm going wrong here... ideas?
I've scoured the Zope documentation for any reference to how to pass a
list variable to a ZSQL function so am guessing this might be the first
problem - is it possible to do this? If so, is there any special syntax
for doing that, or do you just pass the list object?
More information about the Zope-DB