Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function searchKeyword() {
- $searchMe = $this->uri->segment(3);
- $sortBy = $this->uri->segment(4);
- if (!empty($searchMe)) {
- $this->db->select('word,domain_name,scale_name');
- $this->db->from('eloki_keyword');
- $this->db->join('eloki_domain', 'eloki_keyword.domain_id =
- eloki_domain.domain_id', 'left');
- $this->db->join('eloki_scale', 'eloki_keyword.scale_id =
- eloki_scale.scale_id', 'left');
- $this->db->like('word', $searchMe);
- $this->db->order_by($sortBy, "asc");
- $q = $this->db->get();
- if ($q->num_rows() > 0) {
- foreach ($q->result() as $row) {
- $data[] = $row;
- }
- //$data['counter'] = $q->num_rows();
- return $data;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement