[Zope] ZSQL Method Question

Jim Sanford jsanford@atinucleus.com
Wed, 23 Feb 2000 09:34:37 -0600


<dtml-in SQLQuery>
<dtml-if sequence-start>
<dtml-var count-xxx>
...
</dtml-if>
<dtml-else>
<h2>No Records Found!</h2>
</dtml-in>

replace xxx with the name of any field that will always have a value, like the key field. This will give you a count of ALL rows
returned.
 __________________________________________________________________

              Jim Sanford
      .       Database Engineer
     / \  /   Accelerated Technology, Inc.
    /   /     720 Oak Circle Drive East
   /  /  \    Mobile, AL 36609
  / /     \   Voice: 334-661-5770  fax: 334-661-5788
 /         \  E-Mail: jsanford@atinucleus.com
              Web: http://www.atinucleus.com

 Source Code, No Royalties, Any CPU...It just make sense !
 __________________________________________________________________



----- Original Message -----
From: Chris Withers <chrisw@nipltd.com>
To: Zope Mailing List <zope@zope.org>
Sent: Wednesday, February 23, 2000 8:59 AM
Subject: [Zope] ZSQL Method Question


Hi,

Does anyone know how I can find out the number of rows returned by a select
statement in a Z SQL method?

basically, I've got a form which has one row for each row in the database, I
need to put a hidden count input in so the DTML method which processes the form
knows how many rows to expect.

Cheers for any help,

Chris

_______________________________________________
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 )