0
$query1 = 'select DATE_FORMAT(time, "%Y-%m-%d") as date,
count(*) as phone_TotalPerDay
from numrequest
where id_usr = "'.$id_user.'"
AND id_re ="'.$id_re.'"
AND request="ph"
group by id_usr, year(time), DAYOFYEAR(time)
order by year(time) DESC, DAYOFYEAR(time) DESC';
$query2 = 'select DATE_FORMAT(time, "%Y-%m-%d") as date,
count(*) as fax_TotalPerDay
from numrequest
where id_usr = "'.$id_user.'"
AND id_re ="'.$id_re.'"
AND request="fx"
group by id_usr, year(time), DAYOFYEAR(time)
order by year(time) DESC, DAYOFYEAR(time) DESC';
有没有办法组合这两个查询。我真的需要他们在一个资源。 当前每个人都显示号码请求每天。我想合并它们以便每个date
具有phone_TotalPerDay
和fax_TotalPerDay
。结合两个MySQL查询?
这是工作:)。非常感谢。 –