Hi! On May 22, 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)
It looks like a bug. Can you create a test case for this ? > 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; Relevance value of 0 is treated as false. Adding HAVING should not really help. It even makes the query slower, as MySQL cannot use fulltext index to resolve the query. 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