Ver Mensaje Individual
  #13 (permalink)  
Antiguo 03/03/2013, 11:47
Avatar de JaimeMSE
JaimeMSE
 
Fecha de Ingreso: diciembre-2010
Ubicación: Isla Cristina (Huelva)
Mensajes: 164
Antigüedad: 13 años, 4 meses
Puntos: 7
Respuesta: Problemas con clase Mysqli

Hola, gracias por tu respuesta y perdona por tardar tanto.

Al implementar tu código me aparece como que la función fetch_object no está definida:

Fatal error: Call to undefined method mysqli::fetch_object() in C:\Users\JaimeMSE\Dropbox\www\librerias\class_db.p hp on line 55

Código PHP:
Ver original
  1. public function selectAll()
  2.     {
  3.         if($limit=null)
  4.         {
  5.             $this->consulta = $this->db->query("SELECT * FROM web_1_articulos WHERE estado='Publicado' LIMIT 0,2");            
  6.         }
  7.         else
  8.         {
  9.             $this->consulta = $this->db->query("SELECT * FROM web_1_articulos WHERE estado='Publicado' LIMIT 0,2");          
  10.         }
  11.  
  12.         while($rows = $this->db->fetch_object($this->consulta))
  13.         {
  14.             $this->resultado[] = $rows;
  15.         }
  16.  
  17.         return $this->resultado;
  18.     }

He puesto la consulta directamente para que no me dé problemas a la hora de consultar los datos.
__________________
@JaimeMSE - ¡Sígueme!