Ver Mensaje Individual
  #17 (permalink)  
Antiguo 15/07/2015, 10:46
diegoguerrero
 
Fecha de Ingreso: diciembre-2014
Ubicación: Madrid
Mensajes: 274
Antigüedad: 10 años, 2 meses
Puntos: 5
Respuesta: No entiendo el fallo

Código PHP:
Ver original
  1. <?php
  2. require 'conexion.php';
  3. $camposACargar = 'id, cliente, prenda, precio';
  4. $consulta = $db->query('SELECT "id,cliente,prenda,precio" FROM pedidos');
  5. ?>
  6. <html>
  7. <head>
  8. <title>Pedidos</title>
  9. </head>
  10. <body>
  11. <table align="center">
  12. <thead>
  13. <th>Cliente</th>
  14. <th>Prenda</th>
  15. <th>Precio</th>
  16. </thead>
  17. <?
  18. while ($row=$consulta->fetch_array())
  19. {
  20. echo '<tr><td>'.$row["cliente"].'</td>';
  21. echo '<td>'.$row["prenda"].'</td>';
  22. echo '<td>'.$row["precio"].'</td></tr>';
  23. }
  24. ?>
  25. </table>
  26. </body>
  27. </html>

Ahí va todo el código