MySQLi Search Question (Aliases)
I have a situation where I am pulling all the available colors for a product into the query and I need to include that alias in the search, my query looks something like this:
SELECT p.*, (SELECT GROUP_CONCAT(StandardColor) FROM tbl_products WHERE tbl_products.RootModelNumber = p.RootModelNumber) AS AvailableColors FROM tbl_products AS p etc.
but I get a error Unknown column 'AvailableColors' in 'where clause', I understand that this is a MySQL issue but I wondered if there was any way to get this to work in the search SB?
My search code looks like so:
$searchrsDataSet_1->setSearch(array("type"=>"List", "comparison"=>"Includes", "join"=>"AND"), array("AvailableColors"), "s", "color");