mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-02 15:51:49 +02:00
Dashboard bugfix
This commit is contained in:
parent
78594c693f
commit
ba0a0a6a19
2 changed files with 28 additions and 33 deletions
|
@ -57,22 +57,17 @@ class HomeController extends Controller
|
|||
'tickets' => $tickets,
|
||||
]);
|
||||
} else {
|
||||
$endDate = new \DateTime();
|
||||
$startDate = (new \DateTime())->modify('-4 days');
|
||||
|
||||
// Format dates for comparison
|
||||
$startDate = (new \DateTime())->modify('-6 days');
|
||||
$startDateFormatted = $startDate->format('Y-m-d');
|
||||
$endDateFormatted = $endDate->format('Y-m-d');
|
||||
|
||||
$query = "SELECT DATE(crdate) as date, COUNT(id) as count
|
||||
FROM domain
|
||||
WHERE crdate >= :startDate AND crdate <= :endDate
|
||||
WHERE crdate >= :startDate
|
||||
GROUP BY DATE(crdate)
|
||||
ORDER BY DATE(crdate) ASC";
|
||||
|
||||
$params = [
|
||||
':startDate' => $startDateFormatted,
|
||||
':endDate' => $endDateFormatted,
|
||||
];
|
||||
|
||||
$domainsCount = $db->select($query, $params);
|
||||
|
@ -88,7 +83,7 @@ class HomeController extends Controller
|
|||
$dates[] = $date;
|
||||
$counts[] = $count;
|
||||
}
|
||||
|
||||
|
||||
$query = "
|
||||
SELECT
|
||||
r.id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue