PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Dave Waller <dwaller at precisiondrive dot com>
Subject: DBCOUNT
Date: Nov 27 1998 5:34PM

I must be using this wrong because I get -1 for the value.

So..  How do you really use DBCOUNT

Dave Waller

$sql_statement = "select * from $table where call like '".$call."' order

by day";

$dbh->dbcmd($sql_statement);

if ($dbh->dbsqlexec){
    print ("data selected\n");
} else {
    die "Not OK:" . $dbh->DB_ERROR() . "\n";
}

$dbh->dbresults;
$num_rows = $dbh->DBCOUNT;
$status = $dbh->DBROWS;
print $status . "\n";
print $num_rows . "\n";