Jump to content


Photo

Differentiate small and capital letter


  • Please log in to reply
5 replies to this topic

#1 lilywong

lilywong
  • Members
  • PipPipPip
  • Advanced Member
  • 56 posts

Posted 30 May 2006 - 01:18 AM

for example in table student as below:

=================
StudentName
Joe
Jimmy
Mary
=================
in this case, Mary already stored in the table, so the system does not allow user to key in mary, as we want to treat Mary and mary to be the same, any idea ?

thanks.

#2 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 30 May 2006 - 01:29 AM

You might want to use [a href=\"http://www.php.net/ucfirst\" target=\"_blank\"]ucfirst()[/a], [a href=\"http://www.php.net/ucwords\" target=\"_blank\"]ucwords()[/a], [a href=\"http://www.php.net/strtoupper\" target=\"_blank\"]strtoupper()[/a] or [a href=\"http://www.php.net/strtolower\" target=\"_blank\"]strtolower()[/a]
~ D Kuang

#3 lilywong

lilywong
  • Members
  • PipPipPip
  • Advanced Member
  • 56 posts

Posted 30 May 2006 - 04:27 AM

can i set this in my database side ?
i'm using MySQL as db, can i do some setting there so that i will automatically recgnized J and j is the same.
thanks.

#4 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 30 May 2006 - 04:40 AM

I don't think so. But you can use it prior to adding info to the database.
Just set the field "UNIQUE" so it there will be no repeated data.
~ D Kuang

#5 lilywong

lilywong
  • Members
  • PipPipPip
  • Advanced Member
  • 56 posts

Posted 30 May 2006 - 05:59 AM

i am using mySQL Front, but i couldn't find a way to set the field to unique.
any sql example to show me ? thanks

#6 ale_jrb

ale_jrb
  • Members
  • PipPip
  • Member
  • 17 posts
  • LocationLondon, UK

Posted 30 May 2006 - 07:22 AM

The unqiue option is shown here when you create a table, and in turn, fields:

[img src=\"http://img123.imageshack.us/img123/5927/mysqlfront0na.png\" border=\"0\" alt=\"IPB Image\" /]

:)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users