转换 joomla '_content' 表时没有得到正确的输出。我的PHP代码:
<?php
$hostname = "hostname";
$username = "myusername";
$dbname = "mydatabase";
$password = "mypassword";
mysql_connect($hostname, $username, $password) OR DIE ("Unable to
connect to database! Please try again later.");
mysql_select_db($dbname);
$sql=mysql_query("SELECT `title`, `fulltext` FROM `jos_content` WHERE `catid`=8");
while($row=mysql_fetch_assoc($sql)){
$output[]=$row;
}
print(json_encode($output));
mysql_close();
?>
它以 json 文件的形式提供输出,但没有针对“全文”行显示任何数据。输出样本:
[{"title":"Tu Jaane Na - Ajab Prem Ki Ghazab Kahani (Chords)","fulltext":""},
{"title":"Aahatein - Agnee (Chords)","fulltext":""}]
它没有从全文检索任何值。请帮我..