Salve a tutti. ho un problema cn una pagina html collegata tramite php ad un database oracle.
io ho questo comando :
<select name="studente">';
$query = "select Cognome from Studente";
$ris = OCIParse($conn, $query);
OCIExecute($ris);
$numRighe = OCIFetchStatement($ris,$results);
if ( $numRighe > 0 )
{
for ( $i = 0; $i < $numRighe; $i++ )
{
foreach ( $results as $key => $val )
echo "<option value=\"$val[$i]\">$val[$i]";
}
}
Giustamente questo comando mi torna un elenco d cognomi presenti in una tabella del database. A me xò servirebbero anke i nomi d ogni singolo studente,solo ke mettendo "select Cognome,Nome from Studente" mi restituisce un elenco così formato :
Bianchi
Mario
Rossi
Luigi
ecc,ecc.
e non
Bianchi Mario
Rossi Luigi
ecc,ecc.
Come posso risolvere??? Grazie mille!