Initial Commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user