Case sensitivity in fulltext search query

Discussion in 'MySQL' started by nfzgrld, Dec 27, 2008.

  1. #1
    I'm doing a fulltext SELECT from a database MATCHing two fields AGAINST the contents of a var. The whole database is collated in latin1_general_ci. It should be case insensitive, but it is not. I'm doing this in PHP. Here's the query:

    $src = @mysql_query("SELECT * FROM element WHERE MATCH(content,title) AGAINST('$search')");
    Code (markup):
    Any idea where this is going wrong, or am I missing something? If I don't put in the search term with exact case matching it doesn't work. I tried using the mysql LOWER() function but there doesn't seem to be any way to apply it. I either get an error, or I get no effect. Any help or suggestions on this would be highly appreciated.
     
    nfzgrld, Dec 27, 2008 IP
  2. tamilsoft

    tamilsoft Banned

    Messages:
    1,155
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Have you tried the 'BINARY' casting...?
     
    tamilsoft, Dec 29, 2008 IP