Mysql 4.0 always executes case insensitive queries

2005-12-12 Thread Nico Sabbi

Hi,
my mysql always executes case insensitive queries:


SELECT username FROM workflow.user WHERE username = 'NicO'  LIMIT 1;
+--+
| username |
+--+
| nico |
+--+
1 row in set (0.01 sec)



that field is of varchar(255) type.

I don't understand the reason for this behavior.
What should I check?

Thanks,

Nico


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Mysql 4.0 always executes case insensitive queries

2005-12-12 Thread Wolfram Kraus

Nico Sabbi wrote:

Hi,
my mysql always executes case insensitive queries:


SELECT username FROM workflow.user WHERE username = 'NicO'  LIMIT 1;
+--+
| username |
+--+
| nico |
+--+
1 row in set (0.01 sec)



that field is of varchar(255) type.

I don't understand the reason for this behavior.
What should I check?

Thanks,

Nico


You need the binary function:

http://dev.mysql.com/doc/refman/4.1/en/cast-functions.html

HTH,
Wolfram


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Mysql 4.0 always executes case insensitive queries

2005-12-12 Thread Shen139
You should use:
SELECT username FROM workflow.user WHERE username LIKE BINARY 'NicO'  LIMIT
1;

reference:
http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html

On 12/12/05, Nico Sabbi [EMAIL PROTECTED]  wrote:

 Hi,
 my mysql always executes case insensitive queries:


 SELECT username FROM workflow.user WHERE username = 'NicO'  LIMIT 1;
 +--+
 | username |
 +--+
 | nico |
 +--+
 1 row in set (0.01 sec)



 that field is of varchar(255) type.

 I don't understand the reason for this behavior.
 What should I check?

Thanks,

 Nico


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]




--

http://www.openwebspider.org
http://www.eviltime.com