mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 19:10:11 +01:00
fixed a mysql 5.7 introduced sql_mode issue
Change-Id: I2af85d12d2bffaaecb340900b77b64cde3a2fab3 Signed-off-by: SJ <sj@acts.hu>
This commit is contained in:
parent
914929552c
commit
95b906fa3f
@ -39,8 +39,8 @@ class ModelAccountingAccounting extends Model
|
|||||||
$return['stoptimestamp'] = $stop;
|
$return['stoptimestamp'] = $stop;
|
||||||
|
|
||||||
// run query to return all messages
|
// run query to return all messages
|
||||||
$tousers = $this->db->query('SELECT `sent`-(`sent`%86400) as `day`,`to`,count(*) as `count`,sum(`size`) as `size` FROM ' . VIEW_MESSAGES . ' WHERE `sent` >= '.$start.' AND `sent` < '.$stop.' GROUP BY FROM_UNIXTIME(`day`, "%Y.%m.%d."), `to`;');
|
$tousers = $this->db->query('SELECT ANY_VALUE(`sent`-(`sent`%86400)) as `day`,`to`,count(*) as `count`,sum(`size`) as `size` FROM ' . VIEW_MESSAGES . ' WHERE `sent` >= '.$start.' AND `sent` < '.$stop.' GROUP BY FROM_UNIXTIME(`day`, "%Y.%m.%d."), `to`;');
|
||||||
$fromusers = $this->db->query('SELECT `sent`-(`sent`%86400) as `day`,`from`,count(*) as `count`,sum(`size`) as `size` FROM ' . VIEW_MESSAGES . ' WHERE `sent` >= '.$start.' AND `sent` < '.$stop.' GROUP BY FROM_UNIXTIME(`day`, "%Y.%m.%d."), `from`;');
|
$fromusers = $this->db->query('SELECT ANY_VALUE(`sent`-(`sent`%86400)) as `day`,ANY_VALUE(`from`),count(*) as `count`,sum(`size`) as `size` FROM ' . VIEW_MESSAGES . ' WHERE `sent` >= '.$start.' AND `sent` < '.$stop.' GROUP BY FROM_UNIXTIME(`day`, "%Y.%m.%d."), `from`;');
|
||||||
|
|
||||||
// process results from above four queries
|
// process results from above four queries
|
||||||
if($tousers->num_rows > 0)
|
if($tousers->num_rows > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user