Here is the problem.
Most of my entries in the SQL are in Greek. The collation I am using is utf8_general_ci
.
If I manually add the entry in the DB using phpmyAdmin, I can see the value in Greek. But when I try to fetch that value using php, I am bringing back ????.
here is my code:
$result=mysql_query("SELECT name,type,lat,lon FROM map p WHERE p.place='$place' ");
mysql_set_charset("utf-8");
On the other hand, If I add these values using php like this:
$query= "INSERT INTO posts(name,title,type,address,url,place) VALUES('$name','$title',$type,'$address','$url','$place')";
mysql_set_charset("utf-8");
In my php my admin, I see values like this:
Στο κÎντÏο της γÏαφικής ΑÏάχωβας, το ξενοδοχείο Ευ Ζην Studios & Suites απ
But I can fetch them in Greek, if I use that code:
$result=mysql_query("SELECT name,title,type,address,url,place FROM posts p WHERE p.place='$place' ORDER BY p.IdPost LIMIT 50");
mysql_set_charset("utf-8");
The demo code refers to different tables, but the problem happens in both.
So, when adding them manually, I can see the greek content in the SQL-phpmyadmin but cannot fetch them in php.
If I add them from php, I can't see what value has been added, but I can retrieve it normally.
Ideally, I would like to see Greek on the phpmyadmin, and read Greek on the php side (instead of ???).