on-internet
← Community

codeigniter search with join table

Stack Overflow ·

this is my controller function search_keyword() { $cari = $this->input->GET('cari'); $data['dapat'] = $this->order_test_m->search($cari); $this->load->view('admin/a',$data); } this is my model function search($cari) { $this->db->from("uhd_user_order AS t1"); $this->db->join("uhd_user_product_order AS t2", "t1.user_order_id = t2.user_order_id"); $this->db->where('user_order_reference',$cari); $query = $this->db->get('uhd_user_order'); return $query->result(); } this is my view <tr> <th>No.</th> <th>Customer Name</th> <th>Product Code</th> <th>Payment Type</th> <th>Delivery Date</th> <th>Total P

Comments

Sign in or sign up to comment and upvote.

No comments yet.