This simply can't be correct - if a match produces "0" score (no
relevance), the whole condition part after "AND" in this example could
be reduced to "0" (=FALSE), hence the query *should* produce 0
records:
SELECT ISBN,TITLE FROM tBooks WHERE tBooks.ISBN="1876340436" AND 0;
...and here is a real-life example of the correct behavior:
mysql> select indatetime from archivel where addr="FN20" and match
(header) against ("not_a_word");
Empty set (0.00 sec)
mysql> select indatetime from archivel where addr="FN25" and match
(header) against ("reagan");
+----------------+
| 19881201000001 |
| 19990610115359 |
| 20000515123714 |
| 19881122000001 |
| 19881122000001 |
+----------------+
5 rows in set (0.08 sec)
Regards,
Vadim P.
Victoria Reznichenko wrote:
>
> Przemyslaw,
> Wednesday, May 22, 2002, 2:02:52 AM, you wrote:
>
> PP> SELECT ISBN,TITLE FROM tBooks
> PP> WHERE tBooks.ISBN="1876340436"
> PP> AND MATCH (tBooks.TITLE) AGAINST ("britannica")
>
> PP> +------------+-----------------------------+
> PP> | ISBN | TITLE |
> PP> +------------+-----------------------------+
> PP> | 1876340436 | 2000 Lonely Planet Calendar |
> PP> +------------+-----------------------------+
> PP> 1 row in set (0.00 sec)
>
> PP> Why is it so? I suspected to get an empty result set.
> PP> MYSQL Ver 11.16 Distrib 3.23.49, for Win95/Win98 (i32)
>
> MATCH() returnes you relevance value. So, it is always true in
> WHERE clause. As a result you get result where ISBN=1876340436. In
> your case you can re-write you query:
>
> SELECT ISBN,TITLE, MATCH (tBooks.TITLE) AGAINST ("britannica")
> as aa FROM tBooks
> WHERE tBooks.ISBN="1876340436"
> HAVING aa>0;
>
> --
> For technical support contracts, goto https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.net http://www.ensita.net/
> __ ___ ___ ____ __
> / |/ /_ __/ __/ __ \/ / Victoria Reznichenko
> / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
> /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
> <___/ www.mysql.com
>
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
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