我有这个在 mysql 中运行良好的 SQL 语句,但我无法让它在 php 页面上运行并以与 mysql 中相同的方式显示数据?
$NewSql="SELECT r1.ticket, r1.status, r1.time, r2.ticket, r2.status, r2.time
FROM repair_status AS r1, repair_status AS r2
WHERE r1.status = 'New'
AND r2.status = 'Fixed'
AND r1.ticket = r2.ticket";
当我尝试展示时,我会使用类似的东西:
while($New = mysql_fetch_array($NewSql)){
echo $New['r1.status'].$New['r1.ticket'].$New['r2.ticket'].$New['r2.status']."<br>";
}