note 46546 deleted from ref.mssql by sean

From: Date: Fri, 15 Oct 2004 02:40:06 +0000
Subject: note 46546 deleted from ref.mssql by sean
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-78566@lists.php.net to get a copy of this message
Note Submitter: zac at zacbowling dot com ---- This is the function I use to get rowcount. I hacked up a function out of PEAR to make it work. Just call it right after you make a successful query and your done. <?php function rowcount($conn) { $q = @mssql_query('select @@rowcount', $conn); if (!$q) { die("NO ROW COUNT."); } $ar = @mssql_fetch_row($q); if (!$ar) { $result = 0; } else { @mssql_free_result($q); $result = $ar[0]; } return $result; } ?> Hope that helps anyone who finds it useful :-) --- Zac Bowling http://www.zacbowling.com

« previous php.notes (#78566) next »