Ver Mensaje Individual
  #7 (permalink)  
Antiguo 17/03/2015, 15:41
cron4l
 
Fecha de Ingreso: febrero-2015
Ubicación: Mexico
Mensajes: 46
Antigüedad: 9 años, 1 mes
Puntos: 3
Respuesta: Consulta Php con servidor Mysql

Pues si quieres que se vea todo de tu tabla musica seria algo asi:

Código PHP:
include("conexion.php");
$sql="SELECT * FROM musica";
$rs mysql_query($sql); 
Código PHP:
Ver original
  1. <table>
  2.             <thead>
  3.                 <tr>
  4.                     <th>idmusica</th>
  5.                     <th>artista</th>
  6.                     <th>discografia</th>
  7.                     <th>album</th>
  8.                     <th>cancion</th>
  9.                 </tr>
  10.             </thead>
  11.             <tbody>
  12.                 <?php
  13.                     while ($reg = $rs->fetch_assoc()) //trae los registros de tu DB
  14.                     {
  15.                     ?>
  16.                         <tr>
  17.                             <td><?php echo ($registros["idmusica"]); ?></td>
  18.                             <td><?php echo ($registros["artista"]); ?</td>
  19.                             <td><?php echo ($registros["discografia"]); ?></td>
  20.                             <td><?php echo ($registros["album"]);</td>
  21.                             <td><?php echo ($registros["cancion"]); ?></td>
  22.                         </tr>
  23.                     <?php  
  24.                     }
  25.                 ?>
  26.             </tbody>
  27.         </table>
__________________
Agradecer no cuenta nada \o/ +1

<<-----CentOS----->>