Ver Mensaje Individual
  #13 (permalink)  
Antiguo 15/07/2015, 10:29
Avatar de chronos682
chronos682
 
Fecha de Ingreso: febrero-2004
Ubicación: Tunja - Boyacá - Colombia
Mensajes: 627
Antigüedad: 21 años, 1 mes
Puntos: 69
Respuesta: No entiendo el fallo

Cita:
Iniciado por diegoguerrero Ver Mensaje
Código PHP:
Ver original
  1. <?php
  2. while ($row=$consulta->mysqli_fetch_array())
  3. {
  4. echo '<tr><td>'.$row["cliente"].'</td>';
  5. echo '<td>'.$row["prenda"].'</td>';
  6. echo '<td>'.$row["precio"].'</td></tr>';
  7. }
  8. ?>

En este while ya no sale ningún mysqli. Sigue sin funcionar y el código de error es Notice: Undefined variable: result in /Applications/XAMPP/xamppfiles/htdocs/sastre/pedidos.php on line 18

Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in /Applications/XAMPP/xamppfiles/htdocs/sastre/pedidos.php on line 18

Notice: Undefined variable: result in /Applications/XAMPP/xamppfiles/htdocs/sastre/pedidos.php on line 24

Warning: mysql_free_result() expects parameter 1 to be resource, null given in /Applications/XAMPP/xamppfiles/htdocs/sastre/pedidos.php on line 24
El error no está en ninguna parte del código que adjuntas, busca las líneas 18 y 24 en las que otra vez estás mezclando mysql con mysqli, si obervas los mensajes de error te están diciendo que: Warning: mysql_fetch_array() expects parameter es porque estás utilizando mysql_fetch_array en vez de mysqli_fetch_array y lo mismo el otro error mysql_free_result() en vez de mysqli_free_result().
__________________
Si te gustó la respuesta dale +1

HERNÁN G. SIABATO M.
[email protected]