Hello,

I have a query whereby I want to output all records in the column file_name where the characters in file_name are less than 800 characters, with a few and and or statements

PHP Code:
SELECT *
FROM db
WHERE length
(file_name) < 800
AND jl LIKE '%b%'
OR jl  LIKE '%a%'
OR jl  LIKE '%c%'
OR jl  LIKE '%d%'
OR jl LIKE '%e%'
OR jl  LIKE '%f%'
LIMIT 50 
I can't see where i'm going wrong though, as it seems to ignore the length rule? Anyone kindly advise?

Thanks