Ver Mensaje Individual
  #2 (permalink)  
Antiguo 05/02/2011, 10:52
pablobuitres
 
Fecha de Ingreso: octubre-2010
Ubicación: montevideo
Mensajes: 169
Antigüedad: 13 años, 6 meses
Puntos: 5
Respuesta: Ayuda obteniendo datos desde MySQL

Tenes que hacer una consulata a mysql atraves de php, te dejo un ejemplo la tabla la llame amigos, sustitui y fijate si funciona y me contas q tal t fue!
<?php
$link = mysql_connect("localhost", "root", "");

mysql_select_db("pablo", $link);

$result = mysql_query("SELECT * FROM amigos where $link);
if ($row = mysql_fetch_array($result)){



echo "<table border = '1'> \n";

echo "<tr> \n";

echo "<td><b>nombre</b></td> \n";
echo "<td><b>pais</b></td> \n";

echo "</tr> \n";

do {

echo "<tr> \n";
echo "<td>".$row["nombre"]."</td> \n";
echo "<td>".$row["pais"]."</td> \n";


echo "</tr> \n";

} while ($row = mysql_fetch_array($result));



} else {

echo "¡ La base de datos está vacia !";

}








?>