diff --git a/reference/ibm_db2/functions/db2-bind-param.xml b/reference/ibm_db2/functions/db2-bind-param.xml index befc0bbd7d..8b31b6b791 100644 --- a/reference/ibm_db2/functions/db2-bind-param.xml +++ b/reference/ibm_db2/functions/db2-bind-param.xml @@ -1,5 +1,5 @@ - + @@ -150,7 +150,7 @@ db2_bind_param($stmt, 2, "upper_limit", DB2_PARAM_IN); $upper_limit = 15.0; if (db2_execute($stmt)) { - while ($row = db2_fetch_into($stmt)) { + while ($row = db2_fetch_array($stmt)) { print "{$row[0]}, {$row[1]}, {$row[2]}\n"; } } diff --git a/reference/ibm_db2/functions/db2-exec.xml b/reference/ibm_db2/functions/db2-exec.xml index 4f6a2f777d..aecf840b63 100644 --- a/reference/ibm_db2/functions/db2-exec.xml +++ b/reference/ibm_db2/functions/db2-exec.xml @@ -1,5 +1,5 @@ - + @@ -168,7 +168,7 @@ $sql = "SELECT name FROM animals if ($conn) { require_once('prepare.inc'); $stmt = db2_exec($conn, $sql, array('cursor' => DB2_SCROLLABLE)); - while ($row = db2_fetch_into($stmt)) { + while ($row = db2_fetch_array($stmt)) { print "$row[0]\n"; } } diff --git a/reference/ibm_db2/functions/db2-execute.xml b/reference/ibm_db2/functions/db2-execute.xml index b7504490e1..68cd4d63e9 100644 --- a/reference/ibm_db2/functions/db2-execute.xml +++ b/reference/ibm_db2/functions/db2-execute.xml @@ -1,5 +1,5 @@ - + @@ -28,7 +28,7 @@ can retrieve a row as an array from the stmt resource using db2_fetch_assoc, db2_fetch_both, or - db2_fetch_into. Alternatively, you can use + db2_fetch_array. Alternatively, you can use db2_fetch_row to move the result set pointer to the next row and fetch a column at a time from that row with db2_result. @@ -146,9 +146,9 @@ I have 7 pets! db2_exec + db2_fetch_array db2_fetch_assoc db2_fetch_both - db2_fetch_into db2_fetch_row db2_prepare db2_result diff --git a/reference/ibm_db2/functions/db2-fetch-assoc.xml b/reference/ibm_db2/functions/db2-fetch-assoc.xml index eb24515ef8..ae7504f866 100644 --- a/reference/ibm_db2/functions/db2-fetch-assoc.xml +++ b/reference/ibm_db2/functions/db2-fetch-assoc.xml @@ -1,5 +1,5 @@ - + @@ -134,8 +134,8 @@ while ($row = db2_fetch_assoc($result, $i)) { &reftitle.seealso; + db2_fetch_array db2_fetch_both - db2_fetch_into db2_fetch_object db2_fetch_row db2_result diff --git a/reference/ibm_db2/functions/db2-fetch-both.xml b/reference/ibm_db2/functions/db2-fetch-both.xml index 8d4ff6aff8..71a7ac6faa 100644 --- a/reference/ibm_db2/functions/db2-fetch-both.xml +++ b/reference/ibm_db2/functions/db2-fetch-both.xml @@ -1,5 +1,5 @@ - + @@ -23,7 +23,7 @@ row in a result set. Note that the row returned by db2_fetch_both requires more memory than the single-indexed arrays returned by db2_fetch_assoc or - db2_fetch_into. + db2_fetch_array. @@ -141,8 +141,8 @@ while ($row = db2_fetch_both($result, $i)) { &reftitle.seealso; + db2_fetch_array db2_fetch_assoc - db2_fetch_into db2_fetch_object db2_fetch_row db2_result diff --git a/reference/ibm_db2/functions/db2-fetch-into.xml b/reference/ibm_db2/functions/db2-fetch-into.xml index 688d9633de..2c597bc27b 100644 --- a/reference/ibm_db2/functions/db2-fetch-into.xml +++ b/reference/ibm_db2/functions/db2-fetch-into.xml @@ -1,9 +1,9 @@ - + - db2_fetch_into + db2_fetch_array Returns an array, indexed by column position, representing a row in a result set @@ -11,7 +11,7 @@ &reftitle.description; - arraydb2_fetch_into + arraydb2_fetch_array resourcestmt introw_number @@ -65,7 +65,7 @@ Iterating through a forward-only cursor - If you call db2_fetch_into without a specific row + If you call db2_fetch_array without a specific row number, it automatically retrieves the next row in the result set. @@ -76,7 +76,7 @@ $sql = "SELECT id, name, breed, weight FROM animals ORDER BY breed"; $stmt = db2_prepare($conn, $sql); $result = db2_execute($stmt, $sql); -while ($row = db2_fetch_into($result)) { +while ($row = db2_fetch_array($result)) { printf ("%-5d %-16s %-32s %10s\n", $row[0], $row[1], $row[2], $row[3]); } @@ -110,7 +110,7 @@ $sql = "SELECT id, name, breed, weight FROM animals ORDER BY breed"; $result = db2_exec($stmt, $sql, array('cursor' => DB2_SCROLLABLE)); $i=2; -while ($row = db2_fetch_into($result, $i)) { +while ($row = db2_fetch_array($result, $i)) { printf ("%-5d %-16s %-32s %10s\n", $row[0], $row[1], $row[2], $row[3]); $i = $i + 2; diff --git a/reference/ibm_db2/functions/db2-fetch-object.xml b/reference/ibm_db2/functions/db2-fetch-object.xml index 5e6b70d86d..ee414b8e7b 100644 --- a/reference/ibm_db2/functions/db2-fetch-object.xml +++ b/reference/ibm_db2/functions/db2-fetch-object.xml @@ -1,5 +1,5 @@ - + @@ -119,9 +119,9 @@ Come here, Pook, my little cat! &reftitle.seealso; + db2_fetch_array db2_fetch_assoc db2_fetch_both - db2_fetch_into db2_fetch_row db2_result diff --git a/reference/ibm_db2/functions/db2-fetch-row.xml b/reference/ibm_db2/functions/db2-fetch-row.xml index 5378f85af0..edaddcb22a 100644 --- a/reference/ibm_db2/functions/db2-fetch-row.xml +++ b/reference/ibm_db2/functions/db2-fetch-row.xml @@ -1,5 +1,5 @@ - + @@ -31,7 +31,7 @@ Rather than calling db2_fetch_row and db2_result, most applications will call one of db2_fetch_assoc, db2_fetch_both, - or db2_fetch_into to advance the result set pointer + or db2_fetch_array to advance the result set pointer and return a complete row as an array. @@ -109,9 +109,9 @@ goat Rickety Ride &reftitle.seealso; + db2_fetch_array db2_fetch_assoc db2_fetch_both - db2_fetch_into db2_fetch_object db2_result diff --git a/reference/ibm_db2/functions/db2-next-result.xml b/reference/ibm_db2/functions/db2-next-result.xml index da62b24a19..3f8d688cb2 100644 --- a/reference/ibm_db2/functions/db2-next-result.xml +++ b/reference/ibm_db2/functions/db2-next-result.xml @@ -1,5 +1,5 @@ - + @@ -74,14 +74,14 @@ if ($conn) { $stmt = db2_exec($conn, 'CALL multiResults()'); print "Fetching first result set\n"; - while ($row = db2_fetch_into($stmt)) { + while ($row = db2_fetch_array($stmt)) { var_dump($row); } print "\nFetching second result set\n"; $res = db2_next_result($stmt); if ($res) { - while ($row = db2_fetch_into($res)) { + while ($row = db2_fetch_array($res)) { var_dump($row); } } @@ -89,7 +89,7 @@ if ($conn) { print "\nFetching third result set\n"; $res2 = db2_next_result($stmt); if ($res2) { - while ($row = db2_fetch_into($res2)) { + while ($row = db2_fetch_array($res2)) { var_dump($row); } } diff --git a/reference/ibm_db2/functions/db2-num-rows.xml b/reference/ibm_db2/functions/db2-num-rows.xml index 0ddb78687f..33f636fbaa 100644 --- a/reference/ibm_db2/functions/db2-num-rows.xml +++ b/reference/ibm_db2/functions/db2-num-rows.xml @@ -1,5 +1,5 @@ - + @@ -31,7 +31,7 @@ statement and branches if the number of rows is 0, consider modifying your application to attempt to return the first row with one of db2_fetch_assoc, db2_fetch_both, - db2_fetch_into, or db2_fetch_row, + db2_fetch_array, or db2_fetch_row, and branch if the fetch function returns &false;. diff --git a/reference/ibm_db2/functions/db2-result.xml b/reference/ibm_db2/functions/db2-result.xml index e1f7536869..c50508060c 100644 --- a/reference/ibm_db2/functions/db2-result.xml +++ b/reference/ibm_db2/functions/db2-result.xml @@ -1,5 +1,5 @@ - + @@ -100,9 +100,9 @@ goat Rickety Ride &reftitle.seealso; + db2_fetch_array db2_fetch_assoc db2_fetch_both - db2_fetch_into db2_fetch_object db2_fetch_row diff --git a/reference/ibm_db2/functions/db2-rollback.xml b/reference/ibm_db2/functions/db2-rollback.xml index afd6c81bcf..024c56eb96 100644 --- a/reference/ibm_db2/functions/db2-rollback.xml +++ b/reference/ibm_db2/functions/db2-rollback.xml @@ -1,5 +1,5 @@ - + @@ -78,7 +78,7 @@ $conn = db2_connect($database, $user, $password); if ($conn) { $stmt = db2_exec($conn, "SELECT count(*) FROM animals"); - $res = db2_fetch_into( $stmt ); + $res = db2_fetch_array( $stmt ); echo $res[0] . "\n"; // Turn AUTOCOMMIT off @@ -88,14 +88,14 @@ if ($conn) { db2_exec($conn, "DELETE FROM animals"); $stmt = db2_exec($conn, "SELECT count(*) FROM animals"); - $res = db2_fetch_into( $stmt ); + $res = db2_fetch_array( $stmt ); echo $res[0] . "\n"; // Roll back the DELETE statement db2_rollback( $conn ); $stmt = db2_exec( $conn, "SELECT count(*) FROM animals" ); - $res = db2_fetch_into( $stmt ); + $res = db2_fetch_array( $stmt ); echo $res[0] . "\n"; db2_close($conn); }