<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I think it will depend where you're using that collation. AFAIK you can set it at the table level, server level and client level. I'm not 100% sure on where the correct place to set it to get the case insensitive matching you're after, but try each and see what happens.<div><br><div><div>On 24 Jun 2010, at 13:56, Mike Tipping wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>
<font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">There isn't a iLike in Mysql. :o(<br>
<br>
I’ve stated to use<br>
<br>
select * from table where lower(name) = lower(‘$value’) <br>
<br>
Which works but that doesn’t seem a very efficient way of tying to get it to behave as it should be behaving in the first place.<br>
<br>
<br>
<br>
<br>
On 24/06/2010 13:49, "Dan Dart" &lt;<a href="x-msg://127/dandart@googlemail.com">dandart@googlemail.com</a>&gt; wrote:<br>
<br>
</span></font><blockquote type="cite"><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">Have you tried using the lower/upper/camel case instructions in PHP to make MySQL see what you want?<br>
<br>
Jolly confusing how it all seems to contradict itself.<br>
<br>
</span></font><blockquote type="cite"><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">On 24 Jun 2010 13:39, "Mike Tipping" &lt;<a href="x-msg://127/mike@etuna.co.uk">mike@etuna.co.uk</a>&gt; wrote:<br>
<br>
Whenever I run a select in Mysql based on a string comparison, the<br>
comparison is always case sensitive so where 'name' in the DB is 'mike',<br>
select * from table where name = 'MIKE'; won't return results.<br>
<br>
Looking at the MySQL documentation it says that case sensitivity on<br>
comparisons depends on the collation and if I use 'latin1_swedish_ci' (which<br>
I do) the comparison will be case insensitive (which it isn't).<br>
<br>
It also says that STRCMP() is by default case insensitive, but when I try<br>
that it still doesn't return anything.<br>
<br>
Any ideas what I might be doing wrong or what I can use to do a case<br>
insensitive string comparison in MySQL.<br>
<br>
Cheers<br>
<br>
Mike<br>
<br>
<br>
<br>
_______________________________________________<br>
Phpwm mailing list<br>
Website : <a href="http://www.phpwm.org/">http://www.phpwm.org</a><br>
Twitter : <a href="http://www.twitter.com/phpwm">http://www.twitter.com/phpwm</a><br>
Facebook: <a href="http://www.facebook.com/group.php?gid=2361609907">http://www.facebook.com/group.php?gid=2361609907</a><br>
<br>
Post to list: <a href="x-msg://127/Phpwm@mailman.lug.org.uk">Phpwm@mailman.lug.org.uk</a><br>
Archive etc : <a href="https://mailman.lug.org.uk/mailman/listinfo/phpwm">https://mailman.lug.org.uk/mailman/listinfo/phpwm</a><br>
</span></font></blockquote><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt"><br>
<hr align="CENTER" size="3" width="95%"></span></font><font size="2"><font face="Consolas, Courier New, Courier"><span style="font-size:10pt">_______________________________________________<br>
Phpwm mailing list<br>
Website : <a href="http://www.phpwm.org/">http://www.phpwm.org</a><br>
Twitter : <a href="http://www.twitter.com/phpwm">http://www.twitter.com/phpwm</a><br>
Facebook: <a href="http://www.facebook.com/group.php?gid=2361609907">http://www.facebook.com/group.php?gid=2361609907</a><br>
<br>
Post to list: <a href="x-msg://127/Phpwm@mailman.lug.org.uk">Phpwm@mailman.lug.org.uk</a><br>
Archive etc : <a href="https://mailman.lug.org.uk/mailman/listinfo/phpwm">https://mailman.lug.org.uk/mailman/listinfo/phpwm</a><br>
</span></font></font></blockquote>
</div>


_______________________________________________<br>Phpwm mailing list<br>Website : <a href="http://www.phpwm.org">http://www.phpwm.org</a><br>Twitter : <a href="http://www.twitter.com/phpwm">http://www.twitter.com/phpwm</a><br>Facebook: <a href="http://www.facebook.com/group.php?gid=2361609907">http://www.facebook.com/group.php?gid=2361609907</a><br><br>Post to list: <a href="mailto:Phpwm@mailman.lug.org.uk">Phpwm@mailman.lug.org.uk</a><br>Archive etc : <a href="https://mailman.lug.org.uk/mailman/listinfo/phpwm">https://mailman.lug.org.uk/mailman/listinfo/phpwm</a></blockquote></div><br></div></body></html>