unknown example

From: Date: Thu, 15 Jun 2000 10:53:38 +0000
Subject: unknown example
Groups: php.dev 
Request: Send a blank email to php-dev+get-21408@lists.php.net to get a copy of this message
Hi all, Is this the right place to ask ``using php questions''? On line 24: 24 $data = $column['value']; What is ``value''? Where is it defined? Is it a reserved word/value? Any help would be greatly appreciated, David. Taken from "manual-php/function.ocifetchstatement.html" 1 2 <?php 3 /* OCIFetchStatement example mbritton@verinet.com (990624) */ 4 5 $conn = OCILogon("scott","tiger"); 6 7 $stmt = OCIParse($conn,"select * from emp"); 8 9 OCIExecute($stmt); 10 11 $nrows = OCIFetchStatement($stmt,$results); 12 if ( $nrows > 0 ) { 13 print "<TABLE BORDER=\"1\">\n"; 14 print "<TR>\n"; 15 while ( list( $key, $val ) = each( $results ) ) { 16 print "<TH>$key</TH>\n"; 17 } 18 print "</TR>\n"; 19 20 for ( $i = 0; $i < $nrows; $i++ ) { 21 reset($results); 22 print "<TR>\n"; 23 while ( $column = each($results) ) { 24 $data = $column['value']; 25 print "<TD>$data[$i]</TD>\n"; 26 } 27 print "</TR>\n"; 28 } 29 print "</TABLE>\n"; 30 } else { 31 echo "No data found<BR>\n"; 32 } 33 print "$nrows Records Selected<BR>\n"; 34 35 OCIFreeStatement($stmt); 36 OCILogoff($conn); 37 38 ?>

« previous php.dev (#21408) next »