public function selectErrors($limit = null)
    {
        if (!$this->isDb()) {
            return array();
        }

        $sql = "SELECT * FROM log WHERE type LIKE ? ORDER BY created DESC";

        if (isset($limit)) {
            settype($limit, 'integer');
            $sql .= " LIMIT 0,$limit";
        }

        try {
            $results = $this->db->fetchAll($sql, array('php_%'), array('unserialize' => 'data'));
        } catch (Exception $ex) {
            return array();
        }

        $list = array();

        foreach ($results as $result) {
            $list[] = $result['data'];
        }

        return $list;
    }
public function selectErrors($limit = null)
    {
        if (!$this->isDb()) {
            return array();
        }

        $sql = "SELECT * FROM log WHERE type LIKE ? ORDER BY created DESC";

        if (isset($limit)) {
            settype($limit, 'integer');
            $sql .= " LIMIT 0,$limit";
        }

        try {
            $results = $this->db->fetchAll($sql, array('php_%'), array('unserialize' => 'data'));
        } catch (Exception $ex) {
            return array();
        }

        $list = array();

        foreach ($results as $result) {
            $list[] = $result['data'];
        }

        return $list;
    }
public function selectErrors ( $ limit = null ) { if ( ! $ this -> isDb ( ) ) { return array ( ) ; } $ sql = "SELECT * FROM log WHERE type LIKE ? ORDER BY created DESC" ; if ( isset ( $ limit ) ) { settype ( $ limit , 'integer' ) ; $ sql .= " LIMIT 0,$limit" ; } try { $ results = $ this -> db -> fetchAll ( $ sql , array ( 'php_%' ) , array ( 'unserialize' => 'data' ) ) ; } catch ( Exception $ ex ) { return array ( ) ; } $ list = array ( ) ; foreach ( $ results as $ result ) { $ list [ ] = $ result [ 'data' ] ; } return $ list ; }
Returns an array of logged PHP errors from the database
@param integer|null $limit
@return array
Returns an array of logged PHP errors from the database