mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-26 08:30:12 +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
8326953d37
commit
30db6030c5
@ -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