| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Thimble Smith | Date: | April 26 1999 8:28pm |
| Subject: | Re: Selects with case sensitivity | ||
| View as plain text | |||
On Mon, Apr 26, 1999 at 02:15:03PM -0600, Sasha Pachev wrote: > > Auth > > User char(32) > > Pwd char(16) > > > > Select * from Auth where User='barry' and strcmp(Pwd,'Sch')=0 > > > > It does what I want. Is this the best way? No, it's likely to be quite a bit slower than the other solutions. > There is an alternative way, I do not now if it is any > better. Make your data type blob instead of char, and > then = operator will be case-insensitive. s/insensitive\./sensitive./ Instead of declaring it as a BLOB, just use the BINARY keyword when you define the field. Look at the CREATE TABLE docs for more info on the BINARY attribute. Obviously, you'll want Pwd to be BINARY and User to be normal. Tim
| Thread | ||
|---|---|---|
| • Looking for ISP that provides MySQL | Christopher R. Jones | 26 Apr |
| • Re: Looking for ISP that provides MySQL | Bill Gerrard | 26 Apr |
| • Re: Looking for ISP that provides MySQL | Bill Rhodes | 26 Apr |
| • Selects with case sensitivity | Barry | 26 Apr |
| • Re: Looking for ISP that provides MySQL | Chris Jester | 27 Apr |
| • Re: Looking for ISP that provides MySQL | Kyle Cordes | 27 Apr |
| • Re: Looking for ISP that provides MySQL | John Elliott | 27 Apr |
| • Re: Selects with case sensitivity | Sasha Pachev | 27 Apr |
| • Re: Selects with case sensitivity | Thimble Smith | 27 Apr |
| • Problems with BINARY keyword | Richard Antecki | 28 Apr |
| • Re: Problems with BINARY keyword | Fred Read | 28 Apr |
| • Re: Problems with BINARY keyword | Vladimir Berezniker | 29 Apr |
| • Problems with BINARY keyword | Michael Widenius | 11 May |
| • Re: Selects with case sensitivity | Martin Ramsch | 27 Apr |
| • Re: Selects with - Thanks | Barry | 27 Apr |
