Ciao a tutti,
ho questo codice:
codice:
$query = "SELECT id,utente FROM TABELLA order by id ASC";
$result = mysql_query($query) or die ("Errore");
while ($row = mysql_fetch_array($result))
{
echo $row[id]." - ".$row[utente]."
";
}
Adesso vorrei che se nella query dovesse capitare un utente che si chiama Federico sia mostrato in grassetto..
Ho fatto così ma non funziona bene...
codice:
$query = "SELECT id,utente FROM TABELLA order by id ASC";
$result = mysql_query($query) or die ("Errore");
while ($row = mysql_fetch_array($result))
{
if($row[utente] == "Federico"){
echo $row[id]." - ".$row[utente]."
";
}else{
echo $row[id]." - ".$row[utente]."
";
}
}
Come posso fare?
Grazie,
Ciao