Advertisement
ahmadtri26

bembeng

Nov 29th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. public function get_product2($params = null, $count = false, $id = null)
  2. {
  3. if($count == true)
  4. {
  5. $this->db->select('count(*) as many');
  6. $res = $this->db->get();
  7. return $res->row()->many;
  8. }
  9. else
  10. {
  11. $this->db->from('etalase_tags et');
  12. $this->db->join('product_etalase pe', 'pe.id = et.id_product');
  13. $this->db->select('pe.id, pe.name, pe.category, pe.price');
  14. $this->db->where('et.id_etalase', $id);
  15. $res = $this->db->get()->result();
  16. return $res;
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement