Gossamer Forum
Home : General : Databases and SQL :

Case sensativity with LIKE...

Quote Reply
Case sensativity with LIKE...
I've been looking into case sensativity in MySQL's LIKE function. The closest I have found is this;

mysql> SELECT BINARY "a" = "A";

I can't really comprahend how this is supposed to make a LIKe statement case sensative though. Is there such a thing as case sensativity in a LIKE statement? I just can't seem to find anything related to it in the sense that I need.

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Case sensativity with LIKE... In reply to
SELECT * FROM Table WHERE Password LIKE BINARY '%foo%'

For columns storing passwords etc it's best to make the column binary rather than including binary in the query.
Quote Reply
Re: [Paul] Case sensativity with LIKE... In reply to
Wow....never knew it was that simple Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates