I have the following two queries:
$s_name = $this->input->post('check_sur_name');
$sql = "SELECT * FROM patient WHERE MATCH(s_name) AGAINST ('$s_name' IN BOOLEAN MODE ) or MATCH(f_name) AGAINST ('' IN BOOLEAN MODE)";
$query = $this->db->query($sql);
$query = $query->result_array();
echo json_encode($query);
And this is the second one:
$sql = "SELECT * FROM patient WHERE MATCH(s_name) AGAINST ('Mugabe' IN BOOLEAN MODE ) or MATCH(f_name) AGAINST ('' IN BOOLEAN MODE)";
$query = $this->db->query($sql);
$query = $query->result_array();
echo json_encode($query);
The second script runs very well and gives me a feedback but the first one keeps failing, please advise what have I done wrong in the first script?