Hi ,
By defualt , select rows from Mysql is case insenstive .
For exmaple ,
select * from foo where name = 'PHP'
select * from foo where name = 'php'
is the same
how can i do a queny which
select * from foo where name = 'PHP'
is success
but
select * from foo where name = 'php'
fail ??
given
Try
SELECT * FROM foo WHERE strcmp('PHP', name) = 0;
-Original Message-
From: Bass¨Ð¦õªv [mailto:[EMAIL PROTECTED]]
Sent: quarta-feira, 23 de Maio de 2001 14:55
To: [EMAIL PROTECTED]
Subject: [PHP] How to select rows from Mysql with case senstive ??
Hi ,
By defualt
Hey try this, though there are probably better ways,
SELECT * FROM foo WHERE name REGEXP '^[PHP]';
James
Bass¨Ð¦õªv [EMAIL PROTECTED] wrote in message
9egfot$cfu$[EMAIL PROTECTED]">news:9egfot$cfu$[EMAIL PROTECTED]...
Hi ,
By defualt , select rows from Mysql is case insenstive .
For exmaple
On 23-May-01 Bass¨Ð¦õªv wrote:
Hi ,
By defualt , select rows from Mysql is case insenstive .
For exmaple ,
select * from foo where name = 'PHP'
select * from foo where name = 'php'
is the same
how can i do a queny which
select * from foo where name = 'PHP'
is success
but
select *
*Shrug*
Don't have time to test at the moment... That was taken from Chapter 9.3.4.7
of the MySQL manual
http://www.mysql.com/doc/P/a/Pattern_matching.html
Prior to MySQL Version 3.23.4, REGEXP is case sensitive, and the previous
query will return no rows. To match either lowercase or
On Mié 23 May 2001 16:54, Bass¨Ð¦õªv wrote:
Hi ,
By defualt , select rows from Mysql is case insenstive .
For exmaple ,
select * from foo where name = 'PHP'
select * from foo where name = 'php'
is the same
how can i do a queny which
select * from foo where name = 'PHP'
is success
but
On Mié 23 May 2001 17:56, you wrote:
Hey try this, though there are probably better ways,
SELECT * FROM foo WHERE name REGEXP '^[PHP]';
This is not SQL compatible. This would be a correct SQL statement:
SELECT * FROM foo WHERE name LIKE [PHP]%
Saludos... :-)
--
Cualquiera administra un
On Mié 23 May 2001 17:11, Tiago Moitinho wrote:
Try
SELECT * FROM foo WHERE strcmp('PHP', name) = 0;
This is horrable!! Doesn't MySQL have PCRE?
--
Cualquiera administra un NT.
Ese es el problema, que cualquiera administre.
-
8 matches
Mail list logo