Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/06/2009, 19:26
Avatar de abimaelrc
abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 15 años
Puntos: 1517
Respuesta: Como selecciono ciertas filas

Código PHP:
<?php 
// Me conecto con la base de datos y todo eso. 
$registros=mysql_query("select id, paises from tabla",$conexion) or die("Problemas en el select:".mysql_error()); 

echo 
"<table>
  <tr>
    <th>ID</th>
    <th>Paises</th>
  </tr>"
;
while (
$reg=mysql_fetch_array($registros)) { 
  echo 
"<tr>
      <td>{$reg['id']}</td>
      <td>{$reg['paises']}</td>
    </tr>"
;
}
echo 
"</table>";

mysql_close($conexion); 
?>