[Zope] Showing value returned by Z SQL Method

Todd Graham tgraham@speakeasy.net
Sun, 10 Feb 2002 15:45:37 -0800


If I understand your question you have a sql method like

sql method: sel_tab_count

select count(*) as count
from table_name

Create a dtml method called:  show_count

<dtml-in sel_tab_count>
    <dtml-var count>
</dtml-in>


That should do it,  Also you might want to look at adding a Z Search
Interface from the drop down box in the upper right corner and bind it to
your sql method.  Have a look at the syntax it generates..

Hope this helps.

Todd


----- Original Message -----
From: Anclo <anclo@anclo.com>
To: <zope@zope.org>
Sent: Sunday, February 10, 2002 1:43 PM
Subject: [Zope] Showing value returned by Z SQL Method


> Newbie question: How do I get the value of the Z SQL Method "count" which
> returns only the result of SELECT COUNT(*) ?
>
> <dtml-call "REQUEST.set('myCount',_.int(count))"> didn't work.
>
> Thanks for any help.
>
> Anclo
>
>
> _______________________________________________
> 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 )
>