[Zope] what if the query gives no records?

2007-04-10 Thread siva k

Hi,

A very basic question: a dtml-in loop calls an zsql method
it works fine when there is data but when there is no data
it should display no records found. But it displays nothing when
there are no records. Please suggest a soultion


dtml-in select_something(parameter=parameter ,parameter1=parameter1)

 dtml-if _['sequence-start']==_['sequence-end']
no records found

  dtml-else
dtml-var fieldname

/dtml-if

/dtml-in

thanks,

_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] what if the query gives no records?

2007-04-10 Thread Jonathan


- Original Message - 
From: siva k [EMAIL PROTECTED]

To: zope@zope.org
Sent: Tuesday, April 10, 2007 7:36 AM
Subject: [Zope] what if the query gives no records?

A very basic question: a dtml-in loop calls an zsql method
it works fine when there is data but when there is no data
it should display no records found. But it displays nothing when
there are no records. Please suggest a soultion


dtml-in select_something(parameter=parameter 
,parameter1=parameter1)


 dtml-if _['sequence-start']==_['sequence-end']
no records found

  dtml-else
dtml-var fieldname

/dtml-if

/dtml-in



dtml-in
work with content here
dtml-else
if no content, dtml-in passes control here
/dtml-in


hth

Jonathan

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )