note 46545 deleted from ref.mssql by tomsommer

From: Date: Fri, 15 Oct 2004 21:23:51 +0000
Subject: note 46545 deleted from ref.mssql by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-78618@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; } ?> Zac Bowling http://www.zacbowling.com ---- Reason: useless example

« previous php.notes (#78618) next »