[Zope] dtml-if based on result from zsql method

Grimes, Steven steven_grimes@mentorg.com
Mon, 10 Jun 2002 13:30:26 -0500


Try 

<dtml-if zsql_count>
  something
<dtml-else>
  something else
</dtml-if>

 
Thanks,
Steven Grimes
Database Administrator
Accelerated Technology,
Embedded Systems Division of Mentor Graphics
720 Oak Circle Drive East
Mobile, AL 36609


-----Original Message-----
From: Mariusz Blonski [mailto:Mariusz.Blonski@wszpwn.com.pl]
Sent: Monday, June 10, 2002 1:25 PM
To: zope@zope.org
Subject: [Zope] dtml-if based on result from zsql method


I try to write zsql method with behaviour based on result from another zsql
method (simple select count(x) from table where x=...). 
If there are records for x i want to do something, but if not, something
else. I tried to write something like that (x is an parameter of both zsql
methods):
<dtml-call zsql_count>
<dtml if expr="">
something
<dtml-else>
something else
</dtml-if>

I dont know what to write as <dtml-if> expression.

Mariusz


_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )