if (mysql_num_rows($result)){ while ($fila = mysql_fetch_array($result)) { echo '...'; }}else{ echo 'Sin resultados';}