Up Prev Next
From: "Lee Falkenhagen" <falkenl at hotmail dot com>
Subject: Re: number of rows?
Date: May 21 1998 3:53PM
I usually just have an incrementor in my dbnextrow loop that keeps count
of the number of rows selected. Since you have to loop through all the
rows, it is not much overhead.
>From email@example.com Thu May 21 07:35:15 1998
>Received: from IDENT-NOT-QUERIED@list.cren.net (port 60740
[220.127.116.11]) by outbound.Princeton.EDU with SMTP id <541487-2603>;
Thu, 21 May 1998 10:27:18 -0400
>Received: from otter.mbay.net (firstname.lastname@example.org [18.104.22.168])
> by list.cren.net (8.8.7/8.8.7) with ESMTP id KAA21249
> for ; Thu, 21 May 1998 10:26:56 -0400 (EDT)
>Received: from kiruna.peppler.org (mty1-64.dip.mbay.net
> by otter.mbay.net (8.8.8/8.8.8) with SMTP id HAA18305
> for ; Thu, 21 May 1998 07:26:58 -0700
>Received: by kiruna.peppler.org (SMI-8.6/SMI-SVR4)
> id HAA10571; Thu, 21 May 1998 07:26:42 -0700
>From: Michael Peppler
>Content-Type: text/plain; charset=us-ascii
>Date: Thu, 21 May 1998 07:26:41 -0700 (PDT)
>To: SybPerl Discussion List
>Subject: number of rows?
>X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid
>X-Listprocessor-Version: 8.2.06 -- ListProc(tm) by CREN
>H. Siegling writes:
> > Hi !
> > I'm working with Sybperl 2.09 on NT.
> > Is it possible to get the number of rows that '$dbh->dbresult'
> > '$rows=$dbh->DBCOUNT' doesn't work.
>It does work if you ran an update/delete/insert operation. It does NOT
>work if you did a select. That is the way it's supposed to work. See
>the documentation on DBCOUNT() in Sybase's DBlibrary manual
>(http://sybooks.sybase.com if you don't have sybooks installed
>Michael Peppler -||- Data Migrations Inc.
>email@example.com -||- http://www.mbay.net/~mpeppler
>Int. Sybase User Group -||- http://www.isug.com
Get Your Private, Free Email at http://www.hotmail.com