Re: DB search and case sensitive comparison

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Now what I need to do is to ensure that the lookup_string is in the
> useragent string and the CASE is the same: IE: Mozilla and not MOZILLA or
> mozilla etc...

Make the database do the work if possible.

mysql> select * from a where a like '%MOZILLA%';
+---------+
| a       |
+---------+
| Mozilla |
| MOZILLA |
+---------+
2 rows in set (0.00 sec)

mysql> select * from a where a like BINARY '%MOZILLA%';
+---------+
| a       |
+---------+
| MOZILLA |
+---------+
1 row in set (0.00 sec)


-- 
Postgresql & php tutorials
http://www.designmagick.com/

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux