I have a simple sql query, in a joomla php server, rs forms. The result contains Greek characters. However, the result is displayed in question marks.
$sql = "SELECT `FieldValue` FROM `table` where `FieldName` = 'age' and `SubmissionId` = ".$submissionId."
";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc())
{ echo
$row["FieldValue"] ;
}
Result:
??? 20 ???? (question marks should be Greek letters)
I tried using convert as utf8, and it did not work. What else can i do?
$sql = "SELECT CONVERT(`FieldValue` USING utf8) as `FieldValue`
FROM `table` where `FieldName` = 'age' and `SubmissionId` = ".$submissionId."";