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: jrisley at nex-web4 dot corp dot fedex dot com (Jason Risley)
Subject: Rows Affected Information
Date: Dec 2 1998 6:51PM

Hello,

Does anyone know how to retrieve the ROWS_AFFECTED Information for a DELETE
or UPDATE sql statement?

Thanks for your support!
Jason


I have the following:
WinNT4.0(SP3); Apache 1.3.3; SybPerl 2.10; Perl 5.004.02


The following is my code:

$! = 1;
print "Content-type: text/html\n\n";
use CGI::Switch;
use Sybase::CTlib;
$uid = 'd';
$pwd = 'd';
$srv = 'd';


$db=Sybase::CTlib->ct_connect($uid, $pwd, $srv);
$db->ct_execute("delete notification where notify_type = 'email' ");
if ( $db->ct_results($result) == CS_SUCCEED) {
	print "
Number of Rows Affected: $num_rows
\n"; } if ( $db->ct_results($result) == CS_FAIL) { print "
An Error occurred Deleting the data in the database.
\n"; print "Please Try again.
\n"; print "If the problem continues, Please contact the Webmaster.
\n"; } }