[Zope-DB] How to send comparison operations (such as > = ) to
	Z SQL?
    Dieter Maurer 
    dieter at handshake.de
       
    Fri Jul 16 14:43:03 EDT 2004
    
    
  
Qingliang Li wrote at 2004-7-16 21:15 +0800:
>Thanks for your relply. Maybe I can't state my question clearly.
>I mean it raise error when i try the following example:
>
>    select * from BAMD
>       <dtml-sqlgroup where>
>            .....
>       <dtml-sqltest ID op=<dtml-var myOperation> type=nb optional>
>            .....
>
>where the myOperation is a variable (it could be "eq", "gt", etc.).
>Is there a method that can handle such a problem?
You cannot use "dtml-sqltest" when the operator is not a constant.
In this case, must must emulate it by more primitive constructs,
e.g.
   <dtml-if ID>ID &dtml-myOperation; <dtml-sqlvar ID type=string></dtml-if>
-- 
Dieter
    
    
More information about the Zope-DB
mailing list