logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

cvs: pecl /ibm_db2/tests test_200.phpt test_201.phpt: msg#00109

Subject: cvs: pecl /ibm_db2/tests test_200.phpt test_201.phpt
dbs             Sat Apr 16 23:20:56 2005 EDT

  Modified files:              
    /pecl/ibm_db2/tests test_200.phpt test_201.phpt 
  Log:
  Corrected multiple result set retrieval unit tests.
  
  
http://cvs.php.net/diff.php/pecl/ibm_db2/tests/test_200.phpt?r1=1.1&r2=1.2&ty=u
Index: pecl/ibm_db2/tests/test_200.phpt
diff -u pecl/ibm_db2/tests/test_200.phpt:1.1 
pecl/ibm_db2/tests/test_200.phpt:1.2
--- pecl/ibm_db2/tests/test_200.phpt:1.1        Wed Apr  6 13:51:45 2005
+++ pecl/ibm_db2/tests/test_200.phpt    Sat Apr 16 23:20:56 2005
@@ -56,17 +56,17 @@
   }
 
   print "Fetching third result set\n";
-  $res = db2_next_result($stmt);
-  if ($res) {
-    while ($row = db2_fetch_into($res)) {
+  $res2 = db2_next_result($stmt);
+  if ($res2) {
+    while ($row = db2_fetch_into($res2)) {
       var_dump($row);
     }
   }
 
   print "Fetching fourth result set (should fail)\n";
-  $res = db2_next_result($stmt);
-  if ($res) {
-    while ($row = db2_fetch_into($res)) {
+  $res3 = db2_next_result($stmt);
+  if ($res3) {
+    while ($row = db2_fetch_into($res3)) {
       var_dump($row);
     }
   }
http://cvs.php.net/diff.php/pecl/ibm_db2/tests/test_201.phpt?r1=1.1&r2=1.2&ty=u
Index: pecl/ibm_db2/tests/test_201.phpt
diff -u pecl/ibm_db2/tests/test_201.phpt:1.1 
pecl/ibm_db2/tests/test_201.phpt:1.2
--- pecl/ibm_db2/tests/test_201.phpt:1.1        Wed Apr  6 13:51:45 2005
+++ pecl/ibm_db2/tests/test_201.phpt    Sat Apr 16 23:20:56 2005
@@ -54,9 +54,9 @@
   }
 
   print "Fetching third result set\n";
-  $res = db2_next_result($stmt);
-  if ($res) {
-    while ($row = db2_fetch_into($res)) {
+  $res2 = db2_next_result($stmt);
+  if ($res2) {
+    while ($row = db2_fetch_into($res2)) {
       var_dump($row);
     }
   }
@@ -113,6 +113,102 @@
   int(6)
 }
 Fetching second result set
-// should have 4 columns here
+array(4) {
+  [0]=>
+  string(16) "Sweater         "
+  [1]=>
+  int(6)
+  [2]=>
+  string(5) "llama"
+  [3]=>
+  string(6) "150.00"
+}
+array(4) {
+  [0]=>
+  string(16) "Smarty          "
+  [1]=>
+  int(2)
+  [2]=>
+  string(5) "horse"
+  [3]=>
+  string(6) "350.00"
+}
+array(4) {
+  [0]=>
+  string(16) "Rickety Ride    "
+  [1]=>
+  int(5)
+  [2]=>
+  string(4) "goat"
+  [3]=>
+  string(4) "9.70"
+}
+array(4) {
+  [0]=>
+  string(16) "Pook            "
+  [1]=>
+  int(0)
+  [2]=>
+  string(3) "cat"
+  [3]=>
+  string(4) "3.20"
+}
+array(4) {
+  [0]=>
+  string(16) "Peaches         "
+  [1]=>
+  int(1)
+  [2]=>
+  string(3) "dog"
+  [3]=>
+  string(5) "12.30"
+}
+array(4) {
+  [0]=>
+  string(16) "Gizmo           "
+  [1]=>
+  int(4)
+  [2]=>
+  string(10) "budgerigar"
+  [3]=>
+  string(4) "0.20"
+}
+array(4) {
+  [0]=>
+  string(16) "Bubbles         "
+  [1]=>
+  int(3)
+  [2]=>
+  string(9) "gold fish"
+  [3]=>
+  string(4) "0.10"
+}
 Fetching third result set
-// should have 1 column here
+array(1) {
+  [0]=>
+  string(16) "Bubbles         "
+}
+array(1) {
+  [0]=>
+  string(16) "Gizmo           "
+}
+array(1) {
+  [0]=>
+  string(16) "Peaches         "
+}
+array(1) {
+  [0]=>
+  string(16) "Pook            "
+}
+array(1) {
+  [0]=>
+  string(16) "Rickety Ride    "
+}
+array(1) {
+  [0]=>
+  string(16) "Smarty          "
+}
+array(1) {
+  [0]=>
+  string(16) "Sweater         "
+}



<Prev in Thread] Current Thread [Next in Thread>