Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Threads_model extends Model
- {
- function __construct()
- {
- parent::Model();
- $this->_table = 'threads';
- }
- function get_threads($limit = 10)
- {
- $this->db->where('active',true);
- $this->db->orderby('id','desc');
- $query = $this->db->get($this->_table, $limit);
- return $query->result();
- }
- function get_thread_by_id($id)
- {
- $this->db->where('id',$id);
- $query = $this->db->get($this->_table, 1);
- }
- }
Add Comment
Please, Sign In to add comment