Codice PHP:
for ($i = 0; $i < count ($risultato); $i++) {
$stringa = array($risultato[$i]);
$array = implode(",", $stringa);
$sql = "SELECT * FROM tabella WHERE codice IN ('$array')";
$query = mysql_query($sql)or die("Non riesco ad eseguire la query");
$results = mysql_fetch_array($query);
while ($results) {
$descrizione = $results[descrizione];
}
echo $descrizione."
";
}
ma non funziona..
la tabella è così
----- id - codice - descrizione
----- 1 - AA - mutazione AA
----- 2 - AB - mutazione AB
----- n - XX - mutazione XX
tutte le variabili e gli array prima di questo codice funzionano.
infatti se stampo l'array risultati mi da l'elenco dei codici.