i have input data for example : sex = male, i can query it like this:
$sex = $data['sex'];
$query = $this->db->rawQuery("SELECT * FROM tbl_emp_information WHERE sex = $sex");
echo json_encode($query);
but if i input sex = male and civil_status = single this query works:
$sex = $data['sex'];
$civil_status = $data['civil_status'];
$query = $this->db->rawQuery("SELECT * FROM tbl_emp_information WHERE sex = $sex AND
civil_status = $civil_status");
echo json_encode($query);
return;
this is the problem: how can i dynamically change the condition based on the inputby user