ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:fetchinto

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
v5:reference:connection:fetchinto [2015/07/27 04:21]
mnewnham
v5:reference:connection:fetchinto [2016/01/17 00:48] (current)
mnewnham ↷ Page moved from v5:reference:fetchinto to v5:reference:connection:fetchinto
Line 1: Line 1:
 ====== fetchInto ====== ====== fetchInto ======
 +~~NOTOC~~
 <WRAP right box> <WRAP right box>
 == Syntax == == Syntax ==
Line 7: Line 8:
 </WRAP> </WRAP>
 ===== Description ===== ===== Description =====
-The PEAR compatible function ''fetchInto()'' retrieves a recordset into an array. +The PEAR compatible function ''fetchInto()'' retrieves a recordset into an array. The array must be passed by reference into the method
 ---------------------------------------- ----------------------------------------
 ===== Usage ====== ===== Usage ======
Line 18: Line 19:
 while (!$result->EOF){ while (!$result->EOF){
     $arr = array();     $arr = array();
-    $result->fetchInto($arr);+    $result->fetchInto(&$arr);
          
     print_r($arr);     print_r($arr);
Line 25: Line 26:
  
 ===== PEAR compatibility ===== ===== PEAR compatibility =====
-This command is no longer supported in the PEAR module.+This command is no longer supported in the PEAR mdb module.
 {{tag>[PEAR]}} {{tag>[PEAR]}}
  
v5/reference/connection/fetchinto.1437963686.txt.gz · Last modified: 2017/04/21 11:35 (external edit)