I'm trying to do a search against two fulltext indexes. I can successfully
search against either one separately, like:
$psl->set_query("SELECT Products.ID, Products.Name, " .
"Products.Photo, Products.Description " .
"FROM Products, Categories, ProductsCategories " .
"WHERE Categories.ParentID=$MainCatID " .
"AND Categories.ID=ProductsCategories.CategoriesID " .
"AND ProductsCategories.ProductsID=Products.ID " .
"AND MATCH (Products.Name, Products.Description) " .
"AGAINST ('$searchtext') " .
"ORDER BY Products.Name");
Or:
$psl->set_query("SELECT Products.ID, Products.Name, " .
"Products.Photo, Products.Description " .
"FROM Products, Categories, ProductsCategories, Items " .
"WHERE Categories.ParentID=$MainCatID " .
"AND Categories.ID=ProductsCategories.CategoriesID " .
"AND ProductsCategories.ProductsID=Products.ID " .
"AND Items.ProductsID=Products.ID " .
"AND MATCH (Items.Description) " .
"AGAINST ('$searchtext') " .
"ORDER BY Products.Name");
But I get an unknow error when I try to search against both like:
$psl->set_query("SELECT Products.ID, Products.Name, " .
"Products.Photo, Products.Description " .
"FROM Products, Categories, ProductsCategories, Items " .
"WHERE Categories.ParentID=$MainCatID " .
"AND Categories.ID=ProductsCategories.CategoriesID " .
"AND ProductsCategories.ProductsID=Products.ID " .
"AND Items.ProductsID=Products.ID " .
"AND MATCH (Products.Name, Products.Description, Items.Description) " .
"AGAINST ('$searchtext') " .
"ORDER BY Products.Name");
Can anyone tell me what I'm doing wrong?
Thanks in advance.
--
Lowell Allen
Graphic Design for Print and Web
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php