Search (non-English language) text in MySQL columns

Discussion in 'MySQL' started by Tim Smith, Jun 6, 2008.

  1. #1
    Dear all,
    I am using MySQL.

    One of my column database contains strings in non-English language, like "Nguyễn Văn", etc. (latin_swedish_ci collation)

    I use PHP search box to search for that string in database. If I enter exact string "Nguyễn Văn" into search box, I get the result, no problem.

    My problem is ....how if I don't want to type exact string (annoying for my members), but only "Nguyen Van", and I get the result ?


    Thank you very much for advice.

    Tim
     
    Tim Smith, Jun 6, 2008 IP
  2. pavelJ

    pavelJ Peon

    Messages:
    17
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    1) get value from search box
    2) create value2 by replacing all ễ to e and ă to a
    3) make a search WHERE a = value OR a = value2
     
    pavelJ, Jun 9, 2008 IP