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($...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |