Fatal error: Call to undefined method Post::where()
<p>`A Database Error Occurred</p>

<p>Error Number: 1054</p>

<p>Unknown column`    //I need a useful solution to solve this error , after a couple of hours inves-
     tigating. It's still the same. Is there anyone?</p>

<pre><code>function update_post($postID,$data){
    $this-&gt;where('postID',$postID); //error line
    $this-&gt;db-&gt;update('posts',$data);
} 

//code of posts.php
function editpost($postID){
    $data['success']=0;
    if($_POST){
        $data_post=array(
            'title'=&gt;$_POST['title'],
            'post'=&gt;$_POST['post'],
            'active'=&gt;1
        );
        $this-&gt;post-&gt;update_post($postID,$data); // update_post function
        $data['success']=1;
    }
    $data['post']=$this-&gt;post-&gt;get_post($postID);
    $this-&gt;load-&gt;view('edit_post',$data);
}
</code></pre>
