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