[PHP-DB] Case sensitive search

2004-07-18 Thread Rosen
Hi,
I have a simple table:

test (
  id int unsigned NOT NULL auto_increment,
  data varchar(30) default NULL,
  PRIMARY KEY  (id))

with two simple records:
id  data
1   a
2   A

When I perform select * from test where data='a'  - it return me both
rows.

By default in MySQL comparing of strings is case-insensitive.
How can I perform a case sensitive search in text fields ?

Tnanks in advance,
Rosen

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Case sensitive search

2004-07-18 Thread Doug Thompson
Rosen wrote:
Hi,
I have a simple table:
test (
  id int unsigned NOT NULL auto_increment,
  data varchar(30) default NULL,
  PRIMARY KEY  (id))
with two simple records:
id  data
1   a
2   A
When I perform select * from test where data='a'  - it return me both
rows.
http://dev.mysql.com/doc/mysql/en/Case_Sensitivity_Operators.html
Doug
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php