mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:17:02 +02:00
display proper oldest record based on the sent date
This commit is contained in:
@ -169,8 +169,8 @@ class ModelHealthHealth extends Model {
|
||||
public function get_oldest_record_ts() {
|
||||
$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)) {
|
||||
$data = array_pop($query->rows);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user