mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 05:20:30 +03:00
Merge pull request #213 from Mibew/stats
Make statistics compatible with the default MySQL 5.7 settings
This commit is contained in:
commit
f9c5d4dbaf
@ -52,7 +52,6 @@ function get_by_date_statistics($start, $end)
|
||||
. "FROM {threadstatistics} s "
|
||||
. "WHERE s.date >= :start "
|
||||
. "AND s.date < :end "
|
||||
. "GROUP BY DATE(FROM_UNIXTIME(date)) "
|
||||
. "ORDER BY s.date DESC"),
|
||||
array(
|
||||
':start' => $start,
|
||||
@ -63,8 +62,7 @@ function get_by_date_statistics($start, $end)
|
||||
|
||||
// Get statistics aggregated for all accessed interval
|
||||
$total = $db->query(
|
||||
("SELECT DATE(FROM_UNIXTIME(date)) AS date, "
|
||||
. "SUM(threads) AS threads, "
|
||||
("SELECT SUM(threads) AS threads, "
|
||||
. "SUM(missedthreads) AS missedthreads, "
|
||||
. "SUM(sentinvitations) AS sentinvitations, "
|
||||
. "SUM(acceptedinvitations) AS acceptedinvitations, "
|
||||
@ -116,7 +114,7 @@ function get_by_operator_statistics($start, $end)
|
||||
. "WHERE s.operatorid = o.operatorid "
|
||||
. "AND s.date >= :start "
|
||||
. "AND s.date < :end "
|
||||
. "GROUP BY s.operatorid"),
|
||||
. "GROUP BY s.operatorid, o.vclocalename"),
|
||||
array(
|
||||
':start' => $start,
|
||||
':end' => $end,
|
||||
|
Loading…
Reference in New Issue
Block a user