Files
2021-09-17 12:41:45 +02:00

24 lines
695 B
PHP

<?php
class Application_Model_Resources_Errorlog extends App_Model_Resource_Abstract {
protected $_name = "error_log";
protected $_primary = "id";
protected $_defaultOrder = 'data';
protected $_defaultTipoOrder = 'DESC';
/************** METODI SPECIALIZZATI *******************/
public function getNotificationList(){
$stmt = $this -> _db -> query("SELECT 'error' as 'tipo',msg as 'text',id FROM `error_log` WHERE state = '1'");
return $stmt -> fetchAll();
}
public function getNotifyList(){
$stmt = $this -> _db -> query("SELECT 'error' as 'tipo',id,notify FROM `error_log` WHERE state = '1' AND notify = '0'");
return $stmt -> fetchAll();
}
}