Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/07/2011, 05:54
Avatar de Eleazan
Eleazan
 
Fecha de Ingreso: abril-2008
Ubicación: Ibiza
Mensajes: 1.879
Antigüedad: 16 años
Puntos: 326
Respuesta: Problema con tabla PHP

Te falta un bucle.

mysqli_fetch_array cada vez que lo usas, devuelve UNA linea de la tabla. el while podría ser algo así
Código PHP:
while($results_historial myqli_fetch_array($query_historial)) {
   
aqui_imprimo_un_tr

Y eso debería ir en medio de la tabla :) (después del header)


Y te quedaría algo así
(No te recomiendo copiar y pegar, sino hacerlo por ti mismo!)
Código PHP:
<table id="order-history">
<thead>
<tr>
<th align="left"><a href="#" class="sort-link numeric"><span class="arrow">Pedido</span></a></th>
<th align="left">Producto</th>
<th>Cantidad</th>
<th>Estado</th>
</tr>
</thead>
<tbody>
<?php
while($results_historial myqli_fetch_array($query_historial)) { ?>
<tr class="parent-row" onclick="">
<td valign="top"><a href="#"><?php echo $results_historial[guid]; ?></a></td>

<td valign="top">
<strong data-service-id="null"><?php echo $results_historial[factura]; ?></strong>
</td>
<td valign="top" class="align-center"><?php echo $results_historial[cantidad]; ?></td>
<td valign="top" class="align-center status-success">
<?php echo $results_historial[estado]; ?>
</td>
</tr>
<?php ?>
</tbody>
</table>