I’ve got an SQL statement:
$sql =" SELECT DISTINCT
scr.*
FROM scr
LEFT JOIN `users` ON `users`.user_id=scr.user_id
WHERE $email_filter LOWER(scr.genre) LIKE '%$search_word_fix%' **HERE** $psez protage $wwc $prevoption $locatio $rats $rat1 $rat2 $rat3 $rat4
GROUP by scr.sp_name
ORDER BY scr.grade DESC";
when I add lower(scr.classification) like ‘%$search_word_fix%’ in “HERE”
it doesn’t display the correct results.
I was thinking something like (where scr.genre = “searchkeyword” and other filters here) OR (where scr.classification =”searchkeyword” and other filters here)
Only specify Where once. Additional clauses are specified just with “or” and “and”
Use parans to group order of operations