This is a discussion on please help with searching in mysql database within the MySQL forums, part of the Database Server Software category; --> I have: $searchstring="acronis" $sql="SELECT id, category, title, description, testimonials, MATCH(title, description, testimonials) AGAINST ('$searchstring') AS score FROM db_items WHERE ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have: $searchstring="acronis" $sql="SELECT id, category, title, description, testimonials, MATCH(title, description, testimonials) AGAINST ('$searchstring') AS score FROM db_items WHERE MATCH(title, description, testimonials) $result = mysql_query($sql) db_items is row in database. I have word "acronis" in field "title", "description", "testimonials" in this row. But I see 0 if execute echo mysql_num_rows($result). Why If I have my key word? If in phpmysql i run sql query like EXPLAIN SELECT id, category, title, description, testimonials, MATCH(title, description, testimonials) AGAINST ('acronis') AS score FROM db_items WHERE MATCH(title, description, testimonials) AGAINST ('acronis') ORDER BY score DESC I see: id=1, rows=1 Indexes: Keyname:fulltext_index;Type:FULLTEXT, Cardinality:None;Field:title,description,testimoni als Please help. Thank you! |