Welcome Guest, Not a member yet? Register   Sign In
Confusion calling model functions
#3

[eluser]Broxi[/eluser]
Thanks for the reply, I have tried changing the letters as you suggest but no difference,

This is my controller 'Posts'

Code:
<?php

/**
* by RS Designs
* class Posts
*
*/
class Posts extends My_Controller {

  function Posts(){
    parent::Controller();
    $this->load->model('Post');
  }
    function index() {
      $data['query'] = $this->post->getAll();
      $this->load->view('layout/layout', $data);
    }
}

/* End of file posts.php */
/* Location: ./application/controllers/posts.php */


And this is mt model 'Post'

Code:
<?php

/**
* by RS Designs
* class Post
*/
class Post extends Model {

    function Post(){
        parent::Model();
    }

    function getAll() {
      $this->db->select('categories.id, categories.category, posts.*');
      $this->db->from(array('categories'));
      $this->db->where('posts.category_id = categories.id');
      $data = $this->db->get('posts');
      return $data;
    }
}

/* End of file post.php */
/* Location: ./application/models/post.php */

?>

Still getting the same error, maybe I need some new glasses lol

Thanks again
Broxi


Messages In This Thread
Confusion calling model functions - by El Forum - 06-27-2009, 02:13 AM
Confusion calling model functions - by El Forum - 06-27-2009, 02:29 AM
Confusion calling model functions - by El Forum - 06-27-2009, 03:23 AM
Confusion calling model functions - by El Forum - 06-27-2009, 05:12 AM
Confusion calling model functions - by El Forum - 06-27-2009, 01:09 PM
Confusion calling model functions - by El Forum - 06-27-2009, 02:15 PM
Confusion calling model functions - by El Forum - 06-27-2009, 02:40 PM
Confusion calling model functions - by El Forum - 06-27-2009, 02:48 PM
Confusion calling model functions - by El Forum - 06-27-2009, 02:52 PM
Confusion calling model functions - by El Forum - 06-27-2009, 03:06 PM
Confusion calling model functions - by El Forum - 06-27-2009, 03:41 PM
Confusion calling model functions - by El Forum - 06-27-2009, 04:07 PM
Confusion calling model functions - by El Forum - 06-27-2009, 04:58 PM
Confusion calling model functions - by El Forum - 06-27-2009, 05:23 PM
Confusion calling model functions - by El Forum - 06-27-2009, 05:33 PM



Theme © iAndrew 2016 - Forum software by © MyBB