![]() |
Using MySQL MATCH is case sensitive - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Using MySQL MATCH is case sensitive (/showthread.php?tid=23038) |
Using MySQL MATCH is case sensitive - El Forum - 09-28-2009 [eluser]Gaz[/eluser] Hi all, I'm using the following code to do a FULLTEXT match on some data Code: $this->db->where('MATCH (`content`) AGAINST ("'.$search_term.'")', NULL, FALSE); Basically, the query string returned from this seems to be case sensitive when run in CI, but case insensitive when run from my MySQL client Sequel Pro. I.e. The string 'United Kingdom' produces results in CI, but 'united kingdom' does not (although both these strings return the same results in my MySQL client). The field 'content' I'm searching against is a text field, and the database charset and collation are utf8, utf8_general_ci. I'm puzzled as to why the same query produces different results, depending on where it's run. Any light anybody could shed on this would be much appreciated. Cheers, Gaz. Using MySQL MATCH is case sensitive - El Forum - 09-28-2009 [eluser]n0xie[/eluser] Step 1, show us the query that is build by active record. Step 2, try the query without active record, and see if this returns the same resultset. |