Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Articles_model extends CI_Model {
- function __construct() {
- parent::__construct();
- }
- function select_articles($limit = 4) {
- $this->db->select('*');
- $this->db->from('nama_tabel');
- $this->db->limit($limit);
- $this->db->order_by('tgl_input' , 'desc');
- return $this->db->get();
- }
- function count_all() {
- return $this->db->count_all('nama_tabel');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement