Re: [GENERAL] interesting PHP/MySQL thread

From: Ian Barwick <barwick(at)gmx(dot)net>
To: nolan(at)celery(dot)tssi(dot)com, scrappy(at)postgresql(dot)org (The Hermit Hacker)
Cc: scrappy(at)postgresql(dot)org (The Hermit Hacker), JanWieck(at)Yahoo(dot)com (Jan Wieck), pgman(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian), josh(at)agliodbs(dot)com (Josh Berkus), mail(at)joeconway(dot)com (Joe Conway), pgsql-advocacy(at)postgresql(dot)org (\"\"\"Advocacy PostgreSQL\"\"\"), pgsql-general(at)postgresql(dot)org (PostgreSQL-general)
Subject: Re: [GENERAL] interesting PHP/MySQL thread
Date: 2003-06-23 08:01:20
Message-ID: 200306231001.20653.barwick@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-docs pgsql-general

On Monday 23 June 2003 07:33, nolan(at)celery(dot)tssi(dot)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(at)gmx(dot)net

In response to

Browse pgsql-advocacy by date

  From Date Subject
Next Message Arjen van der Meijden 2003-06-23 09:21:25 Re: [GENERAL] interesting PHP/MySQL thread
Previous Message Michael Meskes 2003-06-23 06:33:54 Re: [pgsql-advocacy] MySQL gets $19.5 MM

Browse pgsql-docs by date

  From Date Subject
Next Message Viktor Vislobokov 2003-06-23 08:41:46 Updated Russian version of FAQ
Previous Message Bruce Momjian 2003-06-23 06:16:05 Re: [PATCHES] Synopsis inconsistencies

Browse pgsql-general by date

  From Date Subject
Next Message Masse Jacques 2003-06-23 08:11:30 Re: Urgent : Postgresql Client for linux
Previous Message Shridhar Daithankar 2003-06-23 07:50:09 Re: Urgent : Postgresql Client for linux