Hi!

On Oct 24, Lowell Allen wrote:
> 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.

Does it produce "unknown" error indeed ?
Then it's either a bug or some too old MySQL version.
It should give
"Can't find FULLTEXT index matching the column list" error :-)

Regards,
Sergei

-- 
MySQL Development Team
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
       <___/

---------------------------------------------------------------------
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

Reply via email to