[Zope] how to check if the ResultSet is null?

Chris Withers chrisw@nipltd.com
Thu, 13 Jul 2000 09:43:30 +0100


You could always do something like this first:
"select Count(usr_email) from info(table name) where usr_email =
<dtml-sqlvar usr_email type=string>" 
Then check the result will be either 1 or 0.

That's asking for trouble 'cos Zope ain't gonna like an id such as
'Count(usr_email)', it's a great idea though :-)

Here's how you might need to rephrase it to make Zope happy:
"select Count(usr_email) as usremail from info(table name) where
usr_email = <dtml-sqlvar usr_email type=string>"

HTH,

Chris