-1

here is the query:

 $query = "
  SELECT * FROM cbs_tasks 
  WHERE team_member_id = $uid and task_title LIKE '%".$search."%'
  OR task_desc LIKE '%".$search."%' 
  OR task_cat LIKE '%".$search."%' 
  OR task_priority LIKE '%".$search."%' 
  OR status LIKE '%".$search."%'
 ";
Ankur Tiwari
  • 2,762
  • 2
  • 23
  • 40

1 Answers1

0

put the OR section in brackets and you will get the desired output.

$query = "
  SELECT * FROM cbs_tasks 
  WHERE team_member_id = $uid and (task_title LIKE '%".$search."%'
  OR task_desc LIKE '%".$search."%' 
  OR task_cat LIKE '%".$search."%' 
  OR task_priority LIKE '%".$search."%' 
  OR status LIKE '%".$search."%' )
 ";
Satish51
  • 119
  • 6