[Zope] Showing value returned by Z SQL Method

Anclo anclo@anclo.com
Sun, 10 Feb 2002 23:21:34 -0500


At 06:45 PM 2/10/2002, you wrote:
>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

Todd,

many thanks. Actually I looked at the Z Search Interface and this is the 
syntax used if your SQL method is named "count":

<dtml-in count>

    <dtml-var expr="_['COUNT(*)']">

</dtml-in>

Anclo