Skip to content

Commit

Permalink
fix(graph): Fix current day
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco (Valandur) committed Dec 1, 2019
1 parent 225f19d commit 76b3746
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/framework/services/DatabaseService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ export class DatabaseService {
const [rows] = await pool.query<RowDataPacket[]>(
'SELECT YEAR(`createdAt`) AS year, MONTH(`createdAt`) AS month, DAY(`createdAt`) AS day, COUNT(`id`) AS total ' +
`FROM ${db}.${TABLE.joins} ` +
'WHERE `guildId` = ? AND `createdAt` > ? AND `createdAt` < ? ' +
'WHERE `guildId` = ? AND `createdAt` >= ? AND `createdAt` <= ? ' +
'GROUP BY YEAR(`createdAt`), MONTH(`createdAt`), DAY(`createdAt`)',
[guildId, from, to]
);
Expand Down Expand Up @@ -700,7 +700,7 @@ export class DatabaseService {
const [rows] = await pool.query<RowDataPacket[]>(
'SELECT YEAR(`createdAt`) AS year, MONTH(`createdAt`) AS month, DAY(`createdAt`) AS day, COUNT(`id`) AS total ' +
`FROM ${db}.${TABLE.leaves} ` +
'WHERE `guildId` = ? AND `createdAt` > ? AND `createdAt` < ? ' +
'WHERE `guildId` = ? AND `createdAt` >= ? AND `createdAt` <= ? ' +
'GROUP BY YEAR(`createdAt`), MONTH(`createdAt`), DAY(`createdAt`)',
[guildId, from, to]
);
Expand Down

0 comments on commit 76b3746

Please sign in to comment.