Smoot Carl-Mitchell wrote:
On Tue, 30 Mar 2004 16:00:41 -0600
"JupiterHost.Net" <[EMAIL PROTECTED]> wrote:
I'd rewrite the way you're doing it:
my @records = @{$dbh->selectall_arrayref($query)};
print "Your search returned $#records results.";
for(@records) {
...
}
$#records returns th
On Tue, 30 Mar 2004 16:00:41 -0600
"JupiterHost.Net" <[EMAIL PROTECTED]> wrote:
> I'd rewrite the way you're doing it:
>
> my @records = @{$dbh->selectall_arrayref($query)};
> print "Your search returned $#records results.";
> for(@records) {
> ...
> }
$#records returns the index of
Andrew Gaffney wrote:
> Is there a way to find out how many records were returned with a DBI
> query? There's the obvious counting each record as you fetch it, but I
> need the count before I start going through them.
I'd rewrite the way you're doing it:
my @records = @{$dbh->selectall_arrayref(
On Tue, 30 Mar 2004 11:04:49 -0600
Andrew Gaffney <[EMAIL PROTECTED]> wrote:
> Is there a way to find out how many records were returned with a DBI query? There's
> the
> obvious counting each record as you fetch it, but I need the count before I start
> going
> through them.
>
Hi,
I found t
Hi again Andrew,
> With the mysql driver, it does return the number of fetched
> rows before you start
> iterating through them. It does what I need it to do. Thanks.
Ok, but that behaviour is probably specific to DBD::MySQL, and can't be
relied upon if you change to another DBD... I would use
Guay Jean-Sébastien wrote:
Hello Andrew,
Is there a way to find out how many records were returned
with a DBI query? There's the
obvious counting each record as you fetch it, but I need the
count before I start going
through them.
I was looking through the DBI documentation (perldoc DBI) no
Hello Andrew,
> Is there a way to find out how many records were returned
> with a DBI query? There's the
> obvious counting each record as you fetch it, but I need the
> count before I start going
> through them.
I was looking through the DBI documentation (perldoc DBI) not long ago and
this