I have 6 more table in mysql and every field has a unique field 'works_id', I input data these table. I want to only matching value it shows but it takes 16 rows. Suppose in worker name field it shows two name with repeated 8 times but i want two name only once. It may take two rows. But how its possible. My Table Show:
Ser Works ID Date Of Works Infrastructure Name of System Type of Works Vendor Name Worker Name 1 1016 2017-03-12 Server JoinBDApps Trobleshooting Vintage IT Md Rajaon 2 1016 2017-03-12 Server JoinBDApps Software Upgrade Vintage IT Md Rajaon 3 1016 2017-03-12 Network JoinBDApps Trobleshooting Vintage IT Md Rajaon 4 1016 2017-03-12 Network JoinBDApps Software Upgrade Vintage IT Md Rajaon 5 1016 2017-03-12 Server CMH Trobleshooting Vintage IT Md Rajaon 6 1016 2017-03-12 Server CMH Software Upgrade Vintage IT Md Rajaon 7 1016 2017-03-12 Network CMH Trobleshooting Vintage IT Md Rajaon 8 1016 2017-03-12 Network CMH Software Upgrade Vintage IT Md Rajaon 9 1016 2017-03-12 Server JoinBDApps Trobleshooting GP IT Md Forkan 10 1016 2017-03-12 Server JoinBDApps Software Upgrade GP IT Md Forkan 11 1016 2017-03-12 Network JoinBDApps Trobleshooting GP IT Md Forkan 12 1016 2017-03-12 Network JoinBDApps Software Upgrade GP IT Md Forkan 13 1016 2017-03-12 Server CMH Trobleshooting GP IT Md Forkan 14 1016 2017-03-12 Server CMH Software Upgrade GP IT Md Forkan 15 1016 2017-03-12 Network CMH Trobleshooting GP IT Md Forkan 16 1016 2017-03-12 Network CMH Software Upgrade GP IT Md Forkan
But i Want:
Ser Works ID Date Of Works Infrastructure Name of System Type of Works Vendor Name Worker Name 1 1016 2017-03-12 Server JoinBDApps Trobleshooting Vintage IT Md Rajaon Network CMH Software Upgrade GP IT Md Forkan
My Codeigniter Model is:
$this->db->select('trxn_tbl.works_id, trxn_tbl.works_date, infrashtructure_txn_info.infrashtructure_name, apps_txn_tbl.apps_name, works_type_txn_tbl.works_type, workers_tbl.vendor_id, workers_tbl.name'); $this->db->from('infrashtructure_txn_info'); $this->db->join('workers_tbl', 'trxn_tbl.works_id = workers_tbl.works_id'); $this->db->join('works_type_txn_tbl', 'trxn_tbl.works_id = works_type_txn_tbl.works_id'); $this->db->join('infrashtructure_txn_info', 'trxn_tbl.works_id = infrashtructure_txn_info.works_id'); $this->db->join('apps_txn_tbl', 'trxn_tbl.works_id = apps_txn_tbl.works_id'); $query = $this->db->get(); return $query->result();
Please anybody help me...