s***@hotmail.com
2007-01-09 01:34:25 UTC
I have a FULLTEXT index.
when i query it for a specific item, i get different results in
phpMyAdmin, vs a PHP search app I'm developing.
In the PHP search app, the match I expect isn't returned (in fact
nothing is returned), though in phpMyAdmin, the exact match i expect
is returned -
the query i am using to test this is specific enough to isolate the
result to one match.
Here is my query:
SELECT product_id as id, product_name, MATCH(product_id,
product_name,
notes,
material,
manufacturer,
country)
AGAINST ('+(>$search_term*)' IN BOOLEAN MODE)
AS m FROM quick_search WHERE MATCH(product_id,
product_name,
notes,
material,
manufacturer,
country)
AGAINST ('+(>$search_term*)' IN BOOLEAN MODE)
ORDER BY m DESC, product_name ASC
also, in my search app, if i search for something that doesn't exist, i
get tons of bad results - but in phpMyAdmin, i get 0, which is what i'd
like in the search app.
any clues to what's going on here, given the queries are identical?
thanks,
s7
when i query it for a specific item, i get different results in
phpMyAdmin, vs a PHP search app I'm developing.
In the PHP search app, the match I expect isn't returned (in fact
nothing is returned), though in phpMyAdmin, the exact match i expect
is returned -
the query i am using to test this is specific enough to isolate the
result to one match.
Here is my query:
SELECT product_id as id, product_name, MATCH(product_id,
product_name,
notes,
material,
manufacturer,
country)
AGAINST ('+(>$search_term*)' IN BOOLEAN MODE)
AS m FROM quick_search WHERE MATCH(product_id,
product_name,
notes,
material,
manufacturer,
country)
AGAINST ('+(>$search_term*)' IN BOOLEAN MODE)
ORDER BY m DESC, product_name ASC
also, in my search app, if i search for something that doesn't exist, i
get tons of bad results - but in phpMyAdmin, i get 0, which is what i'd
like in the search app.
any clues to what's going on here, given the queries are identical?
thanks,
s7