Guest User

model

a guest
Apr 27th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. public function all_infografis($index=0) {
  2. $this->output->cache(10);
  3. $date = new DateTime("now");
  4. $curr_date = $date->format('Y-m-d H:i:s');
  5. $this->db->select('miol_nuntium.title, miol_nuntium.slug, miol_nuntium.image, miol_nuntium.content, miol_nuntium.summary, miol_nuntium.status, miol_nuntium.datepublish, miol_nuntium.id as idsm, micom_compartments.id, micom_compartments.title as nama');
  6. $this->db->from('miol_nuntium');
  7. $this->db->join('micom_compartments', 'micom_compartments.id = miol_nuntium.compartment','left');
  8. //$this->db->where('is_headline', 1);
  9. $this->db->limit(20, $index);
  10. //$this->db->where('status', 'published');
  11. $this->db->order_by('miol_nuntium.datepublish','desc');
  12. $this->db->where('miol_nuntium.datepublish <=', $curr_date);
  13. $this->db->where('miol_nuntium.status', 'published');
  14. $this->db->where('miol_nuntium.compartment', '90');
  15. //$query = $this->db->get();
  16. $query = $this->db->query("SELECT COUNT(*) FROM miol_nuntium"); ----> disini error bg
  17. return $query->result_array();
  18. }
Advertisement
Add Comment
Please, Sign In to add comment