Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14343

class CI_DB_mysqli_result could not be converted to string

$
0
0
Hello,

I am trying to fix this error message but could not find a way out yet.  Can anyone help me out?  Thanks in advance.


A PHP Error was encountered
Severity: 4096
Message: Object of class CI_DB_mysqli_result could not be converted to string
Filename: views/pcategories.php
Line Number: 53
Backtrace:
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\EcommerceGiondaCI\application\views\pcategories.php
Line: 53
Function: _error_handler
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\EcommerceGiondaCI\application\controllers\Cpages.php
Line: 215
Function: view
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\EcommerceGiondaCI\index.php
Line: 315
Function: require_once



models/Pages_model.php


PHP Code:
public function call_menu()
        {
                
$this->db->select('*')->from('pages');
        
             
   $query $this->db->get();

                return 
$query->result();        
        } 



controllers/cpages.php


PHP Code:
public function pcategories() {  
    
        $data
['menu'] = $this->db->get('pages');
    
        
$this->load->view('pcategories'$data);  
    
    
    



views/pcategories.php


PHP Code:
<div class="row-fluid">
                <
div class="span12">
                    
                    <
button type="button" class="add" onclick="location.href='<?php echo site_url('cpages/addparentctg'); ?>';">ADD PARENT CATEGORIES</button
                    
                    <
div class="widget-box">
                        <
div class="widget-title"><h5>Parent Categories</h5></div>
                        <
div class="widget-content">
                        
                        <
table border="0" style="width: 100%; height: 90px;">
                            <
tr>
                                <
td>NAME</td>
                                <
td>DESCRIPTION</td>
                                <
td>EDIT</td>
                                <
td>DELETE</td>    
                            </
td>
                            <
tr>
                                <
td><?php echo $menu?></td>
                                <td>Mens</td>
                                <td><button type="button" class="edit" href="adminform.php">EDIT</button></td>
                                <td><button type="button" class="delete" href="adminform.php">DELETE</button></td>    
                            </td>    
                            <tr>
                                <td>Womens</td>
                                <td>Womens</td>
                                <td><button type="button" class="edit" href="adminform.php">EDIT</button></td>
                                <td><button type="button" class="delete" href="adminform.php">DELETE</button></td>    
                            </td>    
                        </table>            
                        </div>
                    </div>                    
                </div>
            </div> 


Line 53:                              <td><?php echo $menu; ?></td>

Viewing all articles
Browse latest Browse all 14343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>