Case Sensitive PostgreSQL [message #375205] |
Fri, 03 August 2001 17:54 |
Kasper Schoonman
Messages: 1 Registered: August 2001
|
Junior Member |
|
|
Beste Joost,
Dear Readers,
I'm learning SQL and PHP besides my school and
have some questions!
When I use this query:
SELECT * FROM friends WHERE firstname LIKE
'%$firstname%'
it's case-sensitive.. So the content of the 'cel' must
be 100% the same as the variable. So 'Kasper'
does not match 'kasper'!
also tried the querry with an = instead of an LIKE!
SELECT * FROM friends WHERE firstname =
'$firstname'
Same problem!
Does anybody know a simple solution?
For the people who wanna knowthe server specs:
PIII 733Mhz
256 MB
Debian Linux 2.2r3
PHP 3.0
PostgreSQL
know an solution, please mail
(SQLhelp@applemuseum.com) or ICQ
(24552989)
|
|
|
Re: Case Sensitive PostgreSQL [message #375207 is a reply to message #375205] |
Sun, 05 August 2001 17:52 |
joli
Messages: 5 Registered: August 2001
|
Junior Member |
|
|
Don't know PostgreSQL but you could try
SELECT * FROM friends WHERE upper(firstname) LIKE
upper('%$firstname%')
if you want the query to be case insensitive.
Cheers, Joli
|
|
|