Searching phpbb's 'topic_title' via MYSQL php, but exact match doesn't work
- by Mint
$sql = sprintf("SELECT topic_title FROM `phpbb_topics` WHERE `topic_title` LIKE '%%%s%%' LIMIT 20", mysql_real_escape_string('match this title'));
Which I run this query in phpMyAdmin the results are: (correct)
match this title
match this title 002
But when I run that same MYSQL query in PHP I get: (incorrect)
match this title 002
I have also tried MATCH AGAINST with the same result with both php and phpMyAdmin:
$sql = "SELECT topic_title FROM phpbb_topics WHERE MATCH (topic_title) AGAINST('match this title' IN BOOLEAN MODE)";
Whats going on?
I'v been searching all over the place and have found next to no help :(