Re: [pgsql-advocacy] interesting PHP/MySQL thread - Mailing list pgsql-general

From Ian Barwick
Subject Re: [pgsql-advocacy] interesting PHP/MySQL thread
Date
Msg-id 200306231001.20653.barwick@gmx.net
Whole thread Raw
In response to Re: [pgsql-advocacy] interesting PHP/MySQL thread  (nolan@celery.tssi.com)
List pgsql-general
On Monday 23 June 2003 07:33, nolan@celery.tssi.com wrote:
> > > Personally, if I want case insensitivity, I'll WRITE IT INTO THE CODE,
> > > but I can see how some people might think that 'NOLAN', 'Nolan' and
> > > 'nolan' should be considered as the same data.
> >
> > Oh, you mean like "SELECT * FROM table WHERE field ~* 'nolan';"?
>
> No, I mean as in "SELECT * FROM table WHERE field = 'nolan';"

bad memories ... of website login system ... using MySQL ... returning
several results for a unique login / pw combination ...

To stop this behaviour in MySQL one needs to define CHAR and VARCHAR types
with a "BINARY" attribute, e.g.:

  CREATE TABLE tbl (field VARCHAR(24) BINARY)

My fault though for not reading the manual attentively enough ;-).
-> http://www.mysql.com/doc/en/CHAR.html


Ian Barwick
barwick@gmx.net

pgsql-general by date:

Previous
From: Masse Jacques
Date:
Subject: Re: Urgent : Postgresql Client for linux
Next
From: Thomas Kellerer
Date:
Subject: Re: Urgent : Postgresql Client for linux