markspark100
07-31-2009, 01:53 AM
Hi,
Is it possible to search through two colums concatenated for one value.
I have a products table which includes the columns Brand and Product name, I'm trying to make an autosuggest search bar so when people are typing I need the search to recognise the brand and then also the products listed under that brand so this is an example of what i mean:
SELECT ProductName, Brand FROM products WHERE Brand + ProductName LIKE '$q%'
Is this sort of search possible?? if not any ideas how I can get around the problem; I have considered splitting the search term into seperate words however some brands are more than one word so not really sure how to go about that either :confused:
Any help would be really appreciated.
Cheers
Is it possible to search through two colums concatenated for one value.
I have a products table which includes the columns Brand and Product name, I'm trying to make an autosuggest search bar so when people are typing I need the search to recognise the brand and then also the products listed under that brand so this is an example of what i mean:
SELECT ProductName, Brand FROM products WHERE Brand + ProductName LIKE '$q%'
Is this sort of search possible?? if not any ideas how I can get around the problem; I have considered splitting the search term into seperate words however some brands are more than one word so not really sure how to go about that either :confused:
Any help would be really appreciated.
Cheers