Questo codice stampa un campo select delle informazioni contenute nella tabella solo se la query da almeno un risultato, altrimenti salta l'operazione
$sql="select * from tipo_torneo where stato=1 and data_limite >= curdate()";
$res=mysql_query($sql);
$res2=mysql_query($sql);
$tipo2=mysql_fetch_array($res2);
if($tipo2){
while($tipo=mysql_fetch_array($res)){
echo "".$tipo["tipo_torneo"]." ".$tipo["genere"]."";
}
}
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento