Just like any other return from the database
$sql_text= "select count(*) from ....
$cursor = $dbh->prepare($sql_text);
if (!$cursor)
{
# error creating cursor
$value=0;
} # !cursor
unless ($cursor->execute)
{
$value=0;
# can't execute
}
$value =$cursor->fetchrow;
Tim Vorce
Ford Motor Company
[EMAIL PROTECTED]
-----Original Message-----
From: Stephane Legault [mailto:slegault@;ca.ibm.com]
Sent: Tuesday, November 12, 2002 12:56 PM
To: [EMAIL PROTECTED]
Subject: how to fetch the result of a select count statement?
I do a lot of select in many statement and fetch the result on a array as
needed. But now one of my staement is a "select count() from ...". How can
I get the value of this statement?