cvs: php4 /pear/DB odbc.php /pear/DB/tests/odbc 009.phpt

From: Date: Thu, 26 Jul 2001 21:49:31 +0000
Subject: cvs: php4 /pear/DB odbc.php /pear/DB/tests/odbc 009.phpt
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-352@lists.php.net to get a copy of this message
ssb Thu Jul 26 17:49:31 2001 EDT Added files: /php4/pear/DB/tests/odbc 009.phpt Modified files: /php4/pear/DB odbc.php Log: * implemented DB_odbc::numRows (it is still limited by backend capabilities though) Index: php4/pear/DB/odbc.php diff -u php4/pear/DB/odbc.php:1.31 php4/pear/DB/odbc.php:1.32 --- php4/pear/DB/odbc.php:1.31 Thu Jul 12 07:53:53 2001 +++ php4/pear/DB/odbc.php Thu Jul 26 17:49:30 2001 @@ -237,15 +237,15 @@ // {{{ numRows() /** - * ODBC does not support counting rows in the result set of + * ODBC may or may not support counting rows in the result set of * SELECTs. * * @param $result the odbc result resource - * @return a DB error + * @return the number of rows, or 0 */ function numRows($result) { - return $this->raiseError(DB_ERROR_NOT_CAPABLE); + return odbc_num_rows($result); } // }}} Index: php4/pear/DB/tests/odbc/009.phpt +++ php4/pear/DB/tests/odbc/009.phpt --TEST-- DB_odbc::numRows test --SKIPIF-- <?php require "skipif.inc"; ?> --FILE-- <?php require "connect.inc"; require "mktable.inc"; require "../numrows.inc"; ?> --EXPECT-- 1 2 3 4 5 6 2 0 DB Error: unknown error

« previous php.pear.cvs (#352) next »