cvs: pecl /ibm_db2/tests test_006.phpt test_007.phpt

From: Date: Thu, 23 Feb 2006 16:40:39 +0000
Subject: cvs: pecl /ibm_db2/tests test_006.phpt test_007.phpt
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-5250@lists.php.net to get a copy of this message
kfbombar Thu Feb 23 16:40:39 2006 UTC Added files: /pecl/ibm_db2/tests test_007.phpt test_006.phpt Log: Initial Revision http://cvs.php.net/viewcvs.cgi/pecl/ibm_db2/tests/test_007.phpt?view=markup&rev=1.1 Index: pecl/ibm_db2/tests/test_007.phpt +++ pecl/ibm_db2/tests/test_007.phpt --TEST-- IBM-DB2: db2_pconnect() - passing options --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); $options1 = array('cursor' => DB2_SCROLLABLE); $options2 = array('cursor' => DB2_FORWARD_ONLY); $conn = db2_pconnect($database, $user, $password, $options1); if ($conn) { $stmt = db2_exec( $conn, "SELECT name FROM animals WHERE weight < 10.0", $options2 ); echo "Number of affected rows: " . db2_num_rows( $stmt ); echo "\n"; $stmt = db2_exec( $conn, "SELECT name FROM animals WHERE weight < 10.0" ); echo "Number of affected rows: " . db2_num_rows( $stmt ); db2_close($conn); } else { echo "Connection failed."; } ?> --EXPECT-- Number of affected rows: -1 Number of affected rows: 4 http://cvs.php.net/viewcvs.cgi/pecl/ibm_db2/tests/test_006.phpt?view=markup&rev=1.1 Index: pecl/ibm_db2/tests/test_006.phpt +++ pecl/ibm_db2/tests/test_006.phpt --TEST-- IBM-DB2: db2_connect() - passing options --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); $options1 = array('cursor' => DB2_SCROLLABLE); $options2 = array('cursor' => DB2_FORWARD_ONLY); $conn = db2_connect($database, $user, $password, $options1); if ($conn) { $stmt = db2_exec( $conn, "SELECT name FROM animals WHERE weight < 10.0", $options2 ); echo "Number of affected rows: " . db2_num_rows( $stmt ); echo "\n"; $stmt = db2_exec( $conn, "SELECT name FROM animals WHERE weight < 10.0" ); echo "Number of affected rows: " . db2_num_rows( $stmt ); db2_close($conn); } else { echo "Connection failed."; } ?> --EXPECT-- Number of affected rows: -1 Number of affected rows: 4

« previous php.pecl.cvs (#5250) next »