Foros del Web » Programando para Internet » PHP »

[SOLUCIONADO] Fatal error: Call to a member function fetch_array() on boolean in

Estas en el tema de Fatal error: Call to a member function fetch_array() on boolean in en el foro de PHP en Foros del Web. Como soluciono este error: Fatal error: Call to a member function fetch_assoc() on boolean in.. @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código PHP: Ver original <?php   //Mostrar bd ...
  #1 (permalink)  
Antiguo 26/05/2015, 16:40
Avatar de odek  
Fecha de Ingreso: julio-2011
Ubicación: México
Mensajes: 55
Antigüedad: 12 años, 9 meses
Puntos: 1
Exclamación Fatal error: Call to a member function fetch_array() on boolean in

Como soluciono este error:


Fatal error: Call to a member function fetch_assoc() on boolean in..

Código PHP:
Ver original
  1. <?php
  2.  
  3. //Mostrar bd
  4. $query = "SELECT c_cus FROM laxus";
  5. $result = $mysqli->query($query);
  6. echo("<table>");
  7. while ($rows = $result->fetch_assoc()) {
  8. print("</table>");
  9. print("<td>".$rows["c_id"]."</td>");
  10. print("<td>".$rows["firstname"]."</td>");
  11. print("<td>".$rows["lastname"]."</td>");
  12. print("</tr>");
  13. }
  14. print("</table>");
  15. /* liberar la serie de resultados */
  16. $result->free();
  17.  
  18. /* cerrar la conexión */
  19. $mysqli->close();
  20.  
  21. ?>
__________________
Mi life in pixel -_-

Etiquetas: boolean, call, fatal, function, mysql, select
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:53.