[Zope] How to pass arguments to ZSQL-Methods?

Stephan Richter srichter@cbu.edu
Mon, 03 Apr 2000 04:29:39 -0500


>At 04:36 PM 4/3/00 +0800, you wrote:
>>No joy. Same error.
>
>Ah ha, I knew it. There is a way you can do it without multiple SQL Methods:
>
>SQL_Query (ZSQL Method):
>
>Arguments:
>
>table:string
>qry_criteria:string
>qry_column:string="specific"
>qry_item:string="general"
>
>SQL Body:
>
><dtml-if "qry_column != 'specific' ">
>      SELECT DISTINCT &dtml-qry_column; FROM &dtml-table; WHERE 
> &dtml-qry_criteria;
><dtml-else>
>      SELECT * FROM &dtml-table; WHERE Status='Current' AND 
> &dtml-qry_item; LIKE &dtml-criteria;
></dtml-if>
>
>
>Okay, that should do it. I hope you can see how it works. The code is of 
>course untested.
>
>Reagrds,
>Stephan

--
Stephan Richter - (901) 573-3308 - srichter@cbu.edu
CBU - Physics & Chemistry; Framework Web - Web Design & Development
PGP Key: 735E C61E 5C64 F430 4F9C 798E DCA2 07E3 E42B 5391