[Zope] ZSQL statement pass variables.

RI Dunfey s0231134 at sms.ed.ac.uk
Wed Jan 14 10:45:37 EST 2004


Hi Everyone,

I want to run a zsql select statement from a python script.  I want to specify 
the column headings to include in the SQL statement in the python script before 
executing the script.  I have tried using <dtml-sqlvar my_column_headings 
type="string"> but this puts quotes around them.


ZSQL:

select <my_column_headings> from applicant

In my python I want to specify the headings as a variable, eg.

my_column_headings = title, surname

The variable is passed to the ZSQL and executed as:

select title, surname from applicant.


Do you see what I mean, is thgis possible?  If so could someone point me in the 
right direction.

Kind Regards,

Rob



More information about the Zope mailing list