johny20 Posted July 28, 2013 Share Posted July 28, 2013 Hello, I can't get data from mysql when I put Greek characters in SELECT statement. require_once(dirname(__FILE__).'etc etc etc etc');$mysqli->query("utf8_general_ci"); // I have tried "UTF8" - Didn't work$query = "SELECT * FROM graf WHERE onoma LIKE 'ΓΕ%' ";$mysqli->query("SET CHARACTER SET 'utf8_general_ci'");$result = mysqli_query($mysqli,$query);if ($result !=0){ while ($row = mysqli_fetch_assoc($result)) { echo $row['onoma']; } }echo mysqli_error($mysqli); //gives no errorecho mysqli_sqlstate($mysqli); //gives 00000 which means the statement is correct Also, in MySQL the collation is 'utf_general_ci' for each row. If I do a "select * from graf" I get the data without any encoding problem. Any ideas please? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now