06/09/2002, 17:52
|
| | Fecha de Ingreso: agosto-2002
Mensajes: 301
Antigüedad: 22 años, 6 meses Puntos: 2 | |
Re: conexion base de datos prueba con esto:
<?
//Conexion con la base
mysql_connect("","","&quo t;);
//$db Decimos el nombre de la base de datos
$db="Datos";
//Ejecutamos la sentencia SQL
$result=mysql_db_query("$db","selec t * from clientes");
?>
<table align="center" border="1" cellpadding="1" bgcolor="#68ffff">
<tr>
<th><font color="#180000">Campo1</font></th>
<th><font color="#180000">Campo1</font></th>
<th><font color="#180000">Campo1</font></th>
<th><font color="#180000">Campo1</font></th>
</tr>
<?
//Mostramos los registros
while ($row=mysql_fetch_array($result))
{
echo '<tr><td>'.$row["rut"].'</td>';
echo '<td>'.$row["nombre"].'</td>';
echo '<td>'.$row["apellido"].'</td>';
echo '<td>'.$row["direccion"].'</td>';
}
mysql_free_result($result)
?> |