PDA

View Full Version : MySQL/PHP Selection and Ordering Results



mattbrand
10-27-2007, 03:32 AM
Hey folks.

I have a table of products that has a name and a description field. I have a fulltext index on both the fields, because I want to do a search that looks in both fields.

My problem is that I want to sort the results by products that have the keyword in the name first, followed by those that only have the keyword in the description.

And I have no idea how to do it. Here is my statement:

select * from luna_products where match(luna_products_name,luna_products_description) against ('$keywordlist')

Thanks for any and all help.