mam takie zapytanie:
SELECT COUNT('subscriber_id') AS `count`, DATE_FORMAT( FROM_UNIXTIME( `date` ), '%d' ) AS 'day', DATE_FORMAT( FROM_UNIXTIME( `date` ), '%Y-%m-%d' ) AS 'date_formatted' FROM `subscribers` LEFT JOIN `autoresponder` ON `subscribers`.`id_autoresponder` = `autoresponder`.`id_autoresponder` LEFT JOIN `users` ON `autoresponder`.`user_id` = `users`.`user_id` WHERE `users`.`user_id` = 12 AND `date` >= 1470348295 AND `date` <= 1470953095 AND `subscribers`.`active` = 1 GROUP BY `date` ORDER BY `date_formatted` ASC
Wszystko było by ok, ale czasami zwraca mi:
( ( [day] => 09 [date_formatted] => 2016-08-09 ) ( [day] => 09 [date_formatted] => 2016-08-09 ) ( [day] => 11 [date_formatted] => 2016-08-11 ) )
A chciałbym, aby zwróciło:
( ( [day] => 09 [date_formatted] => 2016-08-09 ) ( [day] => 11 [date_formatted] => 2016-08-11 ) )