Why don't you let the query itself count the record? e.g. select count(*) as tcount from sometable where somecolumn='somevalue' DTML is not really the right toolfor this job, SQL is! ----- Original Message ----- From: "Sheree Beaudette" <sheree@psouth.net> To: <zope@zope.org> Sent: Wednesday, July 25, 2001 9:35 PM Subject: [Zope] Simple, I think!
I've looked everywhere and I think this should be simple but I'm not getting it
I simply want to count the number of records generated by an ZSQL Method (SQL query) within a DTML Method (something like get the record count of that certain query). I then want to refer to this number (could be zero if there are no records) and say if this number is zero then do something, else do something else.
Can anyone help??
_______________________________________________ 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 )