下面的 SQL 调用不断返回:
致命错误:在第 86 行的 /home/content/76/10930776/html/apprentice/report.php 中的非对象上调用成员函数 fetch_assoc()
$sql = "select sum(".$column.") as totalmeetings,username from data where datediff(max(dateinput),min(dateinput)) <= ".$daysdifference." group by username ";
echo $sql;
$result = $mysqli->query($sql);
while($pcresult = $result->fetch_assoc())//line 86
{
}
我究竟做错了什么?SQL 调用打印如下:
select sum(prospects1stmeeting) as totalmeetings,username from data where datediff(max(dateinput),min(dateinput)) <= 500 group by username