Best case-insensitive search for Character Set utf8 COLLATE utf8_bin Columns.

2005-12-27 Thread Robert DiFalco
What is the best (most optimal) way to perform a case-insensitive search for a VARCHAR column with COLLATE utf8_bin? I'm assuming the answer is not: SELECT * FROM MyTable WHERE UPPER(MyColumn) LIKE Upper('%pattern%'); Tia! R. -- MySQL General Mailin

Re: case insensitive search

2005-11-20 Thread Björn Persson
[EMAIL PROTECTED] wrote: > This is what I thought: I have three entries: > 12. afan, pasalic, afan_at_afan_dot_net, 2003-12-18 > 13. Afan, Pasalic, Pasalic_at_yaoo_dot_com, 2001-01-01 > 14. AFAN, PASALIC, ammtar_at_gamil_dot_com, 2003-12-18 > > If I search for *afan* only entry no. 12 will be shown

Re: case insensitive search

2005-11-20 Thread [EMAIL PROTECTED]
* only entry no. 13 will be shown. If I search for *AFAN* only entry no. 14 will be shown. ?!? Thanks. -afan Jasper Bryant-Greene wrote: [EMAIL PROTECTED] wrote: but I'm getting case insensitive search?!? it's not the same I enter afan or Afan or AFAN!?? Your two statements

Re: case insensitive search

2005-11-19 Thread Björn Persson
It's not clear to me whether you want the search to be case sensitive or not, but you need to make sure that the right collation is used. Case sensitive collations end in "_cs" and case insensitive collations end in "_ci". Read about collations in chapter 10 of the manual: http://www.mysql.se/d

Re: case insensitive search

2005-11-18 Thread Scott Haneda
on 11/18/05 2:27 PM, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: > but I'm getting case insensitive search?!? it's not the same I enter > afan or Afan or AFAN!?? > > Any ideas? Set the field type to binary, or use your php to compare the result

Re: case insensitive search

2005-11-18 Thread Jasper Bryant-Greene
[EMAIL PROTECTED] wrote: but I'm getting case insensitive search?!? it's not the same I enter afan or Afan or AFAN!?? Your two statements contradict each other. Either you are getting case insensitive search, meaning that it *is* the same if you enter afan, Afan or AFAN, or you&

case insensitive search

2005-11-18 Thread [EMAIL PROTECTED]
SOC)) { $SALESMEN[] = preg_replace("/$SearchSalesperson/", "style=\"background-color: gold;\">$SearchSalesperson", $result); } } but I'm getting case insensitive search?!? it's not the same I enter afan or Afan or AFAN!?? Any ideas? Thanks for any