Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function get_product2($params = null, $count = false, $id = null)
- {
- if($count == true)
- {
- $this->db->select('count(*) as many');
- $res = $this->db->get();
- return $res->row()->many;
- }
- else
- {
- $this->db->from('etalase_tags et');
- $this->db->join('product_etalase pe', 'pe.id = et.id_product');
- $this->db->select('pe.id, pe.name, pe.category, pe.price');
- $this->db->where('et.id_etalase', $id);
- $res = $this->db->get()->result();
- return $res;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement