error in codeigniter Message: Call to a member function row() on a non-object
<p>I have been working on a CodeIgniter project and when I send the data to the view called - merchant_registration as an array </p>

<p>controller</p>

<pre><code> function Merchant_Registration($para1 = '', $para2 = '') {

        if (!$this-&gt;crud_model-&gt;admin_permission('report')) {
            redirect(base_url() . 'index.php/admin');
        }
        if ($para1 == 'edit') {

            $page_data['vendor_data'] = $this-&gt;db-&gt;get_where('vendor', array(
                        'vendor_id' =&gt; $para2
                    ))-&gt;result_array();
            $this-&gt;load-&gt;view('back/admin/merchant_edit', $page_data);
        } elseif ($para1 == 'update') {
            $page_data['status'] = $this-&gt;input-&gt;post('status');
            $this-&gt;db-&gt;where('vendor_id', $para2);
            $this-&gt;db-&gt;update('vendor', $page_data);
            redirect(base_url() . 'index.php/admin/Merchant_Registration/', 'refresh');
            recache();
        } else {
            $this-&gt;db-&gt;order_by('vendor_id', 'ased');
            $create_timestamp = $this-&gt;input-&gt;post("create_timestamp");  
            $status = $this-&gt;input-&gt;post("status");
//search query
//change the dates to the proper column 
//and find the package column and 
            //$date = DateTime::createFromFormat('Y-m-d"', $create_timestamp);
            $page_data['query'] = $this-&gt;db-&gt;query("select * from vendor where create_timestamp &gt;= UNIX_TIMESTAMP($create_timestamp) and  create_timestamp &lt;= UNIX_TIMESTAMP($create_timestamp)  or status like '%$status%'")-&gt;result_array();
            $page_data['page_name'] = "Merchant_Registration";
            $this-&gt;load-&gt;view('back/index', $page_data);
        }
    }
</code></pre>

<p>It shows this error:</p>

<p>Severity: Error</p>

<p>Message: Call to a member function row() on a non-object</p>

<p>Filename: back/index.php</p>

<p>Line Number: 5</p>

<p>Backtrace:</p>

<p>index file </p>

<pre><code>&lt;?php
    $system_name     =  $this-&gt;db-&gt;get_where('general_settings',array('type' =&gt; 'system_name'))-&gt;row()-&gt;value;
    $system_title    =  $this-&gt;db-&gt;get_where('general_settings',array('type' =&gt; 'system_title'))-&gt;row()-&gt;value;
?&gt;
&lt;?php include 'includes_top.php'; ?&gt;
&lt;body onbeforeunload="HandleBackFunctionality()"&gt;
    &lt;div id="container" class="effect mainnav-lg"&gt;
        &lt;!--NAVBAR--&gt;
        &lt;?php include 'header.php'; ?&gt;
        &lt;!--END NAVBAR--&gt;
        &lt;div class="boxed" id="fol"&gt;
            &lt;!--CONTENT CONTAINER--&gt;
            &lt;div&gt;
            &lt;?php
            include $this-&gt;session-&gt;userdata('title').'/'.$page_name.'.php' ?&gt;
            &lt;/div&gt;
            &lt;!--END CONTENT CONTAINER--&gt;

            &lt;!--MAIN NAVIGATION--&gt;
            &lt;?php include $this-&gt;session-&gt;userdata('title').'/navigation.php' ?&gt;
            &lt;!--END MAIN NAVIGATION--&gt;

        &lt;/div&gt;
        &lt;!-- FOOTER --&gt;
        &lt;?php include 'footer.php'; ?&gt;
        &lt;?php include 'script_texts.php'; ?&gt;
        &lt;!-- END FOOTER --&gt;
        &lt;!-- SCROLL TOP BUTTON --&gt;
        &lt;button id="scroll-top" class="btn"&gt;&lt;i class="fa fa-chevron-up"&gt;
        &lt;/i&gt;&lt;/button&gt;
    &lt;/div&gt;
    &lt;!-- END OF CONTAINER --&gt;

    &lt;!-- SETTINGS - DEMO PURPOSE ONLY --&gt;   
&lt;?php include 'includes_bottom.php'; ?&gt;
</code></pre>