[PHP-DB] Odp: is LIKE operator case sensitive ???

2002-08-20 Thread Krzysztof Socki

 im using query SELECT * FROM table WHERE field LIKE '% $variable %' 

 with this, i want it should not be case sensitive, and should not
 distinguish betn ram,Ram,RAM. but its not doing so. i don't want the case
 sensitive result.


You can do it in this way:
SELECT * FROM table WHERE LOWER(field) LIKE '%.strtolower($variable).%'
LOWER is an SQL function and strtolower is a PHP function. They are both
doing the same thing: returning string with all alphabetic characters
converted to lowercase.

KS



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




[PHP-DB] Odp: Can't use iso8859-2 with PHP+Oracle

2002-05-23 Thread Krzysztof Socki

I don't know exacly what the problem was, but I've done everything carefully
once again (I mean setting all parameters) and it's OK now. Thanks for your
help, Michael!

K.



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




[PHP-DB] Can't use iso8859-2 with PHP+Oracle

2002-05-22 Thread Krzysztof Socki

I put the characters '±æê³ñ󶼿' into the database with php script, and I
find the following in my table: '1fj3qs6?'. I am using Oracle 8.1.7, PHP
4.1.1, Apache 1.3.22. I have set NLS_LANG=Polish_Poland.EE8ISO8859P2 in my
environment and SetEnv=Polish_Poland.EE8ISO8859P2 in httpd.conf. The
database nls_characterset and nls_nchar_characterset are also EE8ISO8859P2.
Does anyone know what I do wrong?

Krzysztof Socki
[EMAIL PROTECTED]



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