Ver Mensaje Individual
  #4 (permalink)  
Antiguo 30/03/2013, 10:31
SeaPirates
 
Fecha de Ingreso: enero-2009
Ubicación: España
Mensajes: 786
Antigüedad: 15 años, 3 meses
Puntos: 9
Respuesta: Duda sobre MySQLI con fetch_assoc

Cita:
Iniciado por andresdzphp Ver Mensaje
En el método sólo necesitas retornar el array con los datos:

Código PHP:
Ver original
  1. public function Query($SQL)
  2. {
  3.     $result = $this->MySQLi->query($SQL);
  4.     return $result->fetch_all();
  5. }

y con un foreach podrías recorrerlo.
Me devuelve:

Call to undefined method mysqli_result::fetch_all()