Oracle-PHP

From: Date: Tue, 20 Jun 2000 18:17:42 +0000
Subject: Oracle-PHP
Groups: php.general.es 
Request: Send a blank email to general-es+get-171@lists.php.net to get a copy of this message
alex pero con otro scrip que utilizo la funcion $nrows = OCIFetchStatement($stmt,$results); SI me dice cuantos registros tiene mi tabla pero no me muestra los registros el scrip es el siguiente: <html> <head> <title> pagina de coneccion a oracle</title> </head> <body> hola <?php /* OCIFetchStatement example mbritton@verinet.com (990624) */ $conn = OCILogon("milogin","mipassword","linux"); $stmt = OCIParse($conn,"select departamento from oficina"); OCIExecute($stmt); $nrows = OCIFetchStatement($stmt,$results); echo $results ; if ( $nrows > 0 ) { print "<TABLE BORDER=\"1\">\n"; print "<TR>\n"; while ( list( $key, $val ) = each( $results ) ) { print "<TH>$key</TH>\n"; } print "</TR>\n"; for ( $i = 0; $i <4 /* $nrows*/; $i++ ) { reset($results); print "<TR>\n"; while ( $column = each($results) ) { $data = $column['value']; print "<TD>$data[$i]</TD>\n"; } print "</TR>\n"; } print "</TABLE>\n"; } else { echo "No data found<BR>\n"; } echo "$nrows REGISTROS HAY EN LA TABLA<BR>\n"; $hola= OCIError() ; if (!$hola) echo (int)$hola; OCIFreeStatement($stmt); OCILogoff($conn); ?> </body> </html>

« previous php.general.es (#171) next »