我有一个简单的SQL查询,在一个joomla php服务器,rs表单。结果包含希腊字符。但是,结果显示在问号中。
$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"] ;
}
结果:
??? 20 ???? (问号应该是希腊字母)
我尝试使用convert作为utf8,但它没有用。我还能做什么?
$sql = "SELECT CONVERT(`FieldValue` USING utf8) as `FieldValue`
FROM `table` where `FieldName` = 'age' and `SubmissionId` = ".$submissionId."";