<?php

class Model_DbTable_Errors extends Zend_Db_Table
{
    protected $_name = 'ErrorLogs';
    
   public function insertData($data)
    {
       
       try{
           $id = $this->insert($data);
           return $id;
       }catch(Exception $e){
          return  false;
       }
       
    }
    
    public function updateData($data,$id)
    {
       
       try{
           $this->update($data,"titleID ='".$id."'");
           return $id;
       }catch(Exception $e){
          return  false;
       }
       
    }
   
   
   public function getRow($id)
    {
       return $data = $this->fetchRow("titleID ='".$id."'");
       
    }  
     
   public function getAll()
    {
       $select = $this->select();
            $select->from(array('t' =>$this->_name))->order("DateTime desc");
               
            $select->setIntegrityCheck(false);
            return $this->fetchAll($select);
    }  
    
    
}