我有一个可以返回我需要的数据的工作查询:
SELECT
round(sum(t.total_talk_time_minutes),2) as TalkTime,
sum(t.total_outbound) as Outbound,
sum(t.total_inbound) as Inbound,
sum(t.dealers_contacted) as Dealers,
t.date_of_report as Date,
DAYNAME(date_of_report) as Day
FROM ambition.ambition_totals t
WHERE date_of_report between
curdate() - interval 5 day and curdate()
group by DATE
order by date
但是,我在php文件中使用它,需要选择并使用它来索引以用于数组索引。这是数据的总和,我没有作为索引存在的现有数据,并且更喜欢使用像行cound或index这样的任意数字。
在像这样的php sql调用中有没有一个好方法呢?