I used the search query below for an on key up event
$query = "select * from employee where
match(first_name,last_name,batch,branch,city)
against ('+$data*' IN BOOLEAN MODE)
ORDER BY FIELD(status, 'Approval') desc,employee_id desc ";
but this query does not search records that have single character or double character - e.g. first_name like aa,qa,qq,ansual
if i type "a" it will show only ansual records not aa.
Thanks & Regards
You are looking for the parameter ft_min_word_len
, which is documented here.
The default is 4, so words with 1, 2, or 3 characters not included in the full text index. You will need to rebuild the index if you need this functionality.