SELECT WHERE LIKE not working if string to compare is longer than whats in DB
The issue I think is only with the last part of the query...
SELECT * FROM `table` WHERE LOWER(field1) LIKE '%string1%' AND LOWER(field2) LIKE 'abc d%' ORDER BY `road`
LOWER(field2) LIKE 'abc d%' ORDER BY `field1`
If the string to search for... 'abc d' is longer than what exists in the DB field field2 then nothing is returned. If the string to search was just 'abc' then it does return results as expected.
How would I query so it returns results if the string to search and the field2 is LIKE even if there is extra characters after the string to search?