More often there is a need to search part of a text in multiple columns and the search is based on a single keyword text box

For e.g. in a users table first name and last name can be stored in seperate columns

Let’s assume a user named Joe Smith stored in a users table with

first _name => Joe

last_name => Smith

If we have a single keyword text box search and if someone types “Joe Smith” and performs a search, a simple search query as below would give no results

For the query to give correct results it needs to be modifed as below

Leave a Reply

Your email address will not be published. Required fields are marked *