mysqlfind-in-set

MYSQL query not working with Greek words in where or FIND_IN_SET


There are two records with ABITE and ABİDE name in the database but below query always return ABITE row in the query response because of Greek character in ABİDE.

SELECT * FROM `namedetails` WHERE FIND_IN_SET (CitizenName,'ABITE,ABİDE')>0

May I know, how we can use the Greek character in where or FIND_IN_SET query?


Solution

  • I got the answer. Let me share it with you. I have added the below codes and it's started rending greek and special character worlds.

    mysqli_query($link, "SET CHARACTER SET utf8");
    mysqli_query($link, "SET NAMES 'utf8'");
    mysqli_query($link, "SET SESSION collation_connection = 'utf8_general_ci'");