Strange sql query result from Mysql and from PHP mysqli_query!
- by qinHaiXiang
this is the query command echo from php web page:
SELECT DISTINCT FT.file_type_name AS type,FT.file_type_en AS tp,FT.file_type_id AS fti, MATCH(keywords) AGAINST ('words <2' IN BOOLEAN MODE ) AS score FROM movie AS M,file_type AS FT WHERE MATCH (keywords) AGAINST ('words <2' IN BOOLEAN MODE ) AND M.type_cn = FT.file_type_id HAVING score >=1 ORDER BY FT.file_type_order;
I am running above query in MySQL tools HeidiSQL and got only tow row records which score are 1.66666 and 2. If I remove the HAVING clause I would got three row records with one's score less than 1.
But the same query I get from PHP mysqli_query() were all the three records and the one which score less than 1 became 1.
What is the problem. Any tips will be pleasure.
Thank you very much!!