Здравствуйте.
Делаю два запроса
function queryMysql($query)
{
global $connection;
$result = $connection->query($query);
if (!$result) die($connection->error);
return $result;
}
$allOrder = queryMysql("SELECT sum(price) as AOrd,Date FROM `orders` INNER JOIN `track_params` ON orders.trackid = track_params.trackid GROUP BY DATE(Date);");
$complitOrder = queryMysql("SELECT sum(price) as COrd,Date FROM `orders` INNER JOIN `track_params` ON orders.trackid = track_params.trackid wherestatus=2 GROUP BY DATE(Date);");
получаю два масива:
Date AOrd
30-04-2015 20
29-04-2015 10
28-04-2015 5
Date COrd
30-04-2015 10
28-04-2015 2
Собственно хочу получить массив с 3 полями
Date AOrd COrd
30-04-2015 20 10
29-04-2015 10 null
28-04-2015 5 2