Suppose I use 2 AND and one OR to retrieve a result, first test with input text value on name, I could get correct result but when I change $getc to any value other than empty string, the result does not change, it only query name value. What is wrong?
$query1 = "SELECT * FROM $tableName WHERE name LIKE '%$asd%' OR descriptions LIKE
'%$asd%' AND category='$getc' AND company_type='$dsp' LIMIT $start, $limit";