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 revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
reference:fetchinto [2015/07/27 04:01] mnewnhamv5:reference:fetchinto [2016/01/15 02:19] – [PEAR compatibility] mnewnham
Line 1: Line 1:
 ====== fetchInto ====== ====== fetchInto ======
 +~~NOTOC~~
 <WRAP right box> <WRAP right box>
 == Syntax == == Syntax ==
Line 7: Line 8:
 </WRAP> </WRAP>
 ===== Description ===== ===== Description =====
-The 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 in the method.  
 +---------------------------------------- 
 +===== Usage ====== 
 +<code php> 
 +/* 
 + * database connection assumed 
 + */ 
 +$SQL = "SELECT * FROM act"; 
 +$result = $db->execute($SQL); 
 +while (!$result->EOF){ 
 +    $arr = array(); 
 +    $result->fetchInto(&$arr); 
 +     
 +    print_r($arr); 
 +
 +</code>
  
 +===== PEAR compatibility =====
 +This command is no longer supported in the PEAR mdb module.
 {{tag>[PEAR]}} {{tag>[PEAR]}}
 +
 +
 +
 +
v5/reference/connection/fetchinto.txt · Last modified: 2016/01/17 00:48 by mnewnham