[Zope] Detecting empty SQL call
Phil Harris
phil@philh.org
Thu, 1 Jul 1999 10:15:31 +0100
Try this
<!--#in dBcall-->
<!--#if "newName == name"-->
<!--#call "REQUEST.set('titleTrue', 'true')"-->
<!--#else-->
<!--#call "REQUEST.set('titleTrue', 'false')"-->
<!--#/if-->
<!--#else->
it failed, no records
<!--#/in-->
HTH
Phil
phil@philh.org
----- Original Message -----
From: Phil Grove <phil.grove@flg21.com>
To: <zope@zope.org>
Sent: Thursday, July 01, 1999 9:56 AM
Subject: [Zope] Detecting empty SQL call
> Hi all,
>
> Can anyone tell me how to detect if the call to a mySQL database returns
an
> empty recordset as my code causes an error if the SQL returns an empty
> recordset.
>
> This is what i am currently using:
>
> <!--#in dBcall-->
> <!--#if "newName == name"-->
> <!--#call "REQUEST.set('titleTrue', 'true')"-->
> <!--#else-->
> <!--#call "REQUEST.set('titleTrue', 'false')"-->
> <!--#/if-->
> <!--#/in-->
>
> i have tried various <!--#if --> statement, but it doesn't seem to make
> any difference.
>
> Any advice?
>
> P.
>
> ---------------------------------------------------------------------
>
> Phil Grove phil.grove@flg21.com
> Web Development 0113 2949494
> flg21 http://www.flg21.com
>
> ---------------------------------------------------------------------
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
>