mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 13:24:41 +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 "
|
. "FROM {threadstatistics} s "
|
||||||
. "WHERE s.date >= :start "
|
. "WHERE s.date >= :start "
|
||||||
. "AND s.date < :end "
|
. "AND s.date < :end "
|
||||||
. "GROUP BY DATE(FROM_UNIXTIME(date)) "
|
|
||||||
. "ORDER BY s.date DESC"),
|
. "ORDER BY s.date DESC"),
|
||||||
array(
|
array(
|
||||||
':start' => $start,
|
':start' => $start,
|
||||||
@ -63,8 +62,7 @@ function get_by_date_statistics($start, $end)
|
|||||||
|
|
||||||
// Get statistics aggregated for all accessed interval
|
// Get statistics aggregated for all accessed interval
|
||||||
$total = $db->query(
|
$total = $db->query(
|
||||||
("SELECT DATE(FROM_UNIXTIME(date)) AS date, "
|
("SELECT SUM(threads) AS threads, "
|
||||||
. "SUM(threads) AS threads, "
|
|
||||||
. "SUM(missedthreads) AS missedthreads, "
|
. "SUM(missedthreads) AS missedthreads, "
|
||||||
. "SUM(sentinvitations) AS sentinvitations, "
|
. "SUM(sentinvitations) AS sentinvitations, "
|
||||||
. "SUM(acceptedinvitations) AS acceptedinvitations, "
|
. "SUM(acceptedinvitations) AS acceptedinvitations, "
|
||||||
@ -116,7 +114,7 @@ function get_by_operator_statistics($start, $end)
|
|||||||
. "WHERE s.operatorid = o.operatorid "
|
. "WHERE s.operatorid = o.operatorid "
|
||||||
. "AND s.date >= :start "
|
. "AND s.date >= :start "
|
||||||
. "AND s.date < :end "
|
. "AND s.date < :end "
|
||||||
. "GROUP BY s.operatorid"),
|
. "GROUP BY s.operatorid, o.vclocalename"),
|
||||||
array(
|
array(
|
||||||
':start' => $start,
|
':start' => $start,
|
||||||
':end' => $end,
|
':end' => $end,
|
||||||
|
Loading…
Reference in New Issue
Block a user