Hi guys, I've tried searching but haven't found an answer to this anywhere so I'm hoping it's something simple and someone can point me in the right direction.
I have a search box in which the user enters a string or a word and presses search. The PHP code then searches the database according to the query and displays the results.
The actual field being search is a string called headline that contains a string such as:
'This Is A Headline'
'Another Headline'
'Yet Another Headline'
Now the search works perfectly but only when the user searches for the first word in a headline, i.e. in the above scenario the results would be correct if you searched for This, Another or Yet, but if you search for Headline, you would get no results.
So how do I get my query to search a string to find a string?
My current code is:
SELECT id, article_type, format, headline FROM tbl_articles WHERE LCASE(headline) LIKE LCASE('$frm_search%') AND article_type = 'News' ORDER BY id DESC;