• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Call to a member function result_array() on boolean

#1
Hello, 

I am having problem with this error message.  Can anyone help me fix this error message?  



Fatal error: Call to a member function result_array() on boolean in C:\Program Files\EasyPHP-Devserver-16.1\eds-www\companygiondaci\application\models\Mpages.php on line 92
A PHP Error was encountered
Severity: Error
Message: Call to a member function result_array() on boolean
Filename: models/Mpages.php
Line Number: 92
Backtrace:

models/Mpages.php

Line 92:      return $query->result_array();



models/Mpages.php


PHP Code:
public function update_pages($pages_id)
    {
        
        
$data = array(
            
'pages_name' => $this->input->post('pages_name'),
            
'create_date' => $this->input->post('create_date'),
            
'pages_order' => $this->input->post('pages_order'),
            
'pages_content' => $this->input->post('pages_content')
        );
    
        
$this->db->where('pages_id'$pages_id);
        
$query $this->db->update('pages'$data);
        return 
$query->result_array();
        
    } 


controllers/Cpages.php


PHP Code:
public function pcategories() { 
    
            
        
$data['posts'] = $this->Mpages->call_parentctg();

        
//$data['ctgparent_name'] = $this->Mpages->call_parentctg();
        //$data['ctgparent_description'] = "Second";//$this->Mpages->retrieve_parentctg();
        
        
$this->load->view('pcategories'$data); 
        
    } 
Reply

#2
Let me read the manual for you ... $this->db->update returns a boolean
See http://www.codeigniter.com/user_guide/da...er::update

It seems like this is at least the third time you have asked the same question!
Reply

#3
Or more
What did you Try? What did you Get? What did you Expect?

Joined the CodeIgniter Community in 2009.          ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.