model function error in codeigniter 2

#1
[eluser]dhaulagiri[/eluser]
Hi friends, i am building new application in codeigniter 2

I am getting error
Quote:Fatal error: Call to undefined method CI_DB_mysql_driver::getwhere() in C:\wamp\www\xxx\application\models\page_model.php on line 23

while writing this function in model
Code:
function fetchPage(){
        $data = array();
        $options = array('status'=>'yes', 'type'=>'about');
        //get items from database
        $this->db->getwhere('pages', $options, 1);
        if($q->numrows() > 0){
            $data = $q->row_array();
        }
        return $data;
        $q->free_result();
    }
pls help

#2
[eluser]WanWizard[/eluser]
Have you checked the manual?

The 1.7.2. manual states:
Quote:Note: get_where() was formerly known as getwhere(), which has been deprecated

As of version 2, getwhere() (and other deprecated methods) have been removed.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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