Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
How can I filter the office id using codeigniter?

I am a student who is practicing Codeigniter. This is the script that I have formed.

$(document).ready(function () {
    $('#hiddenDO').each(function () {
    $('#displayoffice').val($("#hiddenDO option:selected").val());
    
    $.ajax({
      type: "GET",
      url: '<?= site_url('client/displayoffice') ?>',
      data: {"msg":msg},
      dataType:"json",
      success: function (data) {
        console.log(data);

      }

    });

    return false;
  });

}

Controller

    public function displayoffice() {

        $data = $this->input->post();
        $result['hiddenDO'] = $data;
        echo json_encode(array($result));
        exit(0);
        
    }

and my Model

function filterOffice() {

  $data = '3'; //In this part I want to call the value to filter

  $query=$this->db->query("SELECT bi_emplname, bi_empfname, bi_emppic FROM `tblemployee` 
  INNER JOIN `tbl_office` ON ji_off_id=off_id 
  INNER JOIN `tbl201_basicinfo` ON bi_id=ji_bi_id 
  WHERE ji_off_id='$data'");
     return $query->result_array();
  }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!