Ver Mensaje Individual
  #30 (permalink)  
Antiguo 14/10/2005, 12:39
coyote20
 
Fecha de Ingreso: febrero-2005
Mensajes: 867
Antigüedad: 19 años, 2 meses
Puntos: 3
aqui le mando una breve consulta basica a la BD

<?php
$link = mysql_connect("localhost", "dominicana","clave");
mysql_select_db("formulario", $link);
$result = mysql_query("SELECT id_mensaje, categorias, titulo, precioventas, mensaje, id_usuario, identificador, respuestas FROM mensaje", $link);
echo "<table border = '1'> \n";
echo "<tr><td>id_mensaje</td><td>categorias</td><td>titulo</td><td>precioventas</td><td>mensaje</td><td>id_usuario</td><td>identificador</td><td>respuestas</td></tr> \n";
while ($row = mysql_fetch_row($result)){
echo "<tr><td>$row[0]</td><td>$row[1]</td><td>$row[2]</td><td>$row[3]</td><td>$row[4]</td><td>$row[5]</td><td>$row[6]</td><td>$row[7]</td></tr> \n";
}
echo "</table> \n";
?>

id_mensaje categorias titulo precioventas mensaje id_usuario identificador respuestas
10 0303 xxxxxxxxxxxxxx xxxxxxxxxx xxxxxxxxxxxxxxxxxxxxx 0
11 0302 fffffffffffff fffffffff ffffffffffffffffffff 0
12 0701 gggggggggggg ggggggggg gggggggggggggggggggggg 0
13 0602 ggggggggggggggg gggggggg ggggggggggggggggggggggg
Notice: Undefine 0
14 0605 xxxxxxxxxxx xxxxxxxxx xxxxxxxxxxxxxxx
Notice: Undefine 0
15 0601 zzzzz zzzzzzzzzzzzz zzzzzzzzzzzzz
Notice: Undefine 0
16 0603 ddddddddd dddddddd ddddddddddddddddddddddd
Notice: Undefine 0

y en la consulta para ver los usuarios inscripto

<?php
$link = mysql_connect("localhost", "dominicana","clave");
mysql_select_db("formulario", $link);
$result = mysql_query("SELECT id_usuario, apellido, nombre, password, nick, rep_password, ultima_visita,identificador FROM usuarios", $link);
echo "<table border = '1'> \n";
echo "<tr><td>id_usuario</td><td>apellido</td><td>nombre</td><td>password</td><td>nick</td><td>rep_password</td><td>ultima_visita</td><td>identificador</td></tr> \n";
while ($row = mysql_fetch_row($result)){
echo "<tr><td>$row[0]</td><td>$row[1]</td><td>$row[2]</td><td>$row[3]</td><td>$row[4]</td><td>$row[5]</td><td>$row[6]</td><td>$row[7]</td></tr> \n";
}
echo "</table> \n";

?>

resultado

id_usuario apellido nombre password nick rep_password ultima_visita identificador
10 zzzzzzzzzz zzzzzzzzz 02c425157ecd32f259548b33402ff6d3 zzzz zzzz 2005-10-12 14:25:31 d6c6175c6f44586bbdbf97db1c99ecc3
11 xxxxxxxxx xxxxxxxxxxxxx ea416ed0759d46a8de58f63a59077499 xxxx xxxx 2005-10-14 14:54:19 d6c6175c6f44586bbdbf97db1c99ecc3


bueno solo tengo dos de prueba

xxxxxxx
zzzzzzz