mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 06:10:12 +01:00
display proper oldest record based on the sent date
This commit is contained in:
parent
6aad513879
commit
447ea6c47f
@ -56,6 +56,7 @@ create index metadata_idx5 on metadata(`deleted`);
|
|||||||
create index metadata_idx6 on metadata(`arrived`);
|
create index metadata_idx6 on metadata(`arrived`);
|
||||||
create index metadata_idx7 on metadata(`retained`);
|
create index metadata_idx7 on metadata(`retained`);
|
||||||
create index metadata_idx8 on metadata(`fromdomain`);
|
create index metadata_idx8 on metadata(`fromdomain`);
|
||||||
|
create index metadata_idx9 on metadata(`sent`);
|
||||||
|
|
||||||
|
|
||||||
create table if not exists `rcpt` (
|
create table if not exists `rcpt` (
|
||||||
|
@ -2,3 +2,6 @@
|
|||||||
alter table `user_settings` add column `ga_enabled` int default 0;
|
alter table `user_settings` add column `ga_enabled` int default 0;
|
||||||
alter table `user_settings` add column `ga_secret` varchar(255) default null;
|
alter table `user_settings` add column `ga_secret` varchar(255) default null;
|
||||||
|
|
||||||
|
create index metadata_idx9 on metadata(`sent`);
|
||||||
|
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ class ModelHealthHealth extends Model {
|
|||||||
public function get_oldest_record_ts() {
|
public function get_oldest_record_ts() {
|
||||||
$data = array();
|
$data = array();
|
||||||
|
|
||||||
$query = $this->db->query("SELECT `sent` AS `oldest_record_ts` FROM " . TABLE_META . " WHERE deleted=0 ORDER BY `arrived` ASC LIMIT 1");
|
$query = $this->db->query("SELECT `sent` AS `oldest_record_ts` FROM " . TABLE_META . " WHERE `deleted`=0 and `sent` > 837381600 ORDER BY `sent` ASC LIMIT 1");
|
||||||
|
|
||||||
if(isset($query->rows)) {
|
if(isset($query->rows)) {
|
||||||
$data = array_pop($query->rows);
|
$data = array_pop($query->rows);
|
||||||
|
Loading…
Reference in New Issue
Block a user