[Zope] SELECT COUNT(*) ZSQL method -> displaying results?
Alex Reid
alex@phiz.net
Fri, 5 Jan 2001 22:30:21 -0000
Lee,
Have you tried SELECT COUNT(*) AS myCountField
and then using <dtml-var myCountField>
May work.
Alex
alexander.reid@unn.ac.uk
----- Original Message -----
From: Lee <lee.reilly@ntlworld.com>
To: <zope@zope.org>
Sent: Friday, January 05, 2001 10:12 PM
Subject: [Zope] SELECT COUNT(*) ZSQL method -> displaying results?
> Hi,
>
> I am having difficulty displaying the results from an SQL query:
>
> SELECT COUNT(*)
> FROM REGISTRY
> WHERE <dtml-sqltest classcode op=eq type="float">
>
> When I call the ZSQL method from my DTML method and try and display the
> result (using <dtml-var count>) I get a rather horid, "This resource may
> be trying to reference a nonexistent object or variable count" error.
>
> My only thought is that because 'count' isn't actually a proper variable
> (i.e. a column name) it is handled differently.
>
> Can anyone see my error / offer advice?
>
> Thanks very much in advance.
>
> - Best regards,
> Lee
>
> --
> Lee Reilly
> mailto:lee.reilly@ntlworld.com
> http://www.footkick.co.uk/lee
>
>
>
>
> _______________________________________________
> 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 )