Good Day All,

This will work...

mysql> SELECT storyID, title, summary, MATCH summary AGAINST (LCASE('news'))
AS probability
    -> FROM newsStories WHERE MATCH summary AGAINST (LCASE('news')) > 0
LIMIT 0, 5;

But this will not...

mysql> SELECT COUNT(*), MATCH summary AGAINST (LCASE('news')) AS probability
    -> FROM newsStories WHERE MATCH summary AGAINST (LCASE('news')) > 0;
ERROR 1140: Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP 
columns is illegal if there is no GROUP BY clause

I have two questions;

1)
What I'm trying to do is get a number of records that will match this
criteria.  Has anyone 
run into this same problem before?

2)
It seems that full-text searches only work on whole words.  Is this correct.

For example, if summary = "The Blackhawks won 5-4 in a wild hockey game",
then the following query didn't return anything...

mysql> SELECT storyID, title, summary, MATCH summary AGAINST
(LCASE('hawks')) AS probability
    -> FROM newsStories WHERE MATCH summary AGAINST (LCASE('hawks')) > 0
LIMIT 0, 5;

Maybe if I tried regular expressions??



Cheers,

Chris Oson

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