Bluehost.com Web Hosting $6.95

mysql> select 'David!' LIKE '%bob%'; appears to be case sensitive but should not be?

This is a discussion on mysql> select 'David!' LIKE '%bob%'; appears to be case sensitive but should not be? within the MySQL Database forums, part of the Database Forums category; I have a Select querie thats driving me mad... <? $query = "SELECT * FROM news WHERE article LIKE'%".mysql_real_escape_string($...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-03-2006
bokke
 
Posts: n/a
Default mysql> select 'David!' LIKE '%bob%'; appears to be case sensitive but should not be?

I have a Select querie thats driving me mad...

<?

$query = "SELECT * FROM news WHERE article
LIKE'%".mysql_real_escape_string($_GET["abc"])."%' OR heading
LIKE'%".mysql_real_escape_string($_GET["abc"])."%' ORDER BY issue
DESC";
$result = mysql_query($query)
or die ("no can do.");
while($row = mysql_fetch_array($result))
{
?>

It is case sensitive and I don't want it to be - when searching for
'bob' and Bob is typed in it failes to return any rowes. I have done a
long search on this group and others and all seem to have a problem
because they WANT it case sensitive - from the mysql page "By default,
MySQL searches are not case sensitive" ...
so then why is mine? The database is set up as a longtext and the
Collation is armscii8_bin?

If anyone can help me with this I would be very happy.

Thanks

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 03:07 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0