ok
Direktori : /home2/selectio/public_html/srivarielevators.net/application/models/ |
Current File : //home2/selectio/public_html/srivarielevators.net/application/models/Model_category.php |
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Model_category extends CI_Model { public function get_category_data($id) { $sql = "SELECT * FROM tbl_news_category WHERE category_id=?"; $query = $this->db->query($sql,array($id)); return $query->result_array(); } public function get_news_data($id) { $sql = "SELECT * FROM tbl_news WHERE category_id=? ORDER BY news_id ASC"; $query = $this->db->query($sql,array($id)); return $query->result_array(); } }