<?php 
defined('BASEPATH') OR exit('No direct script access allowed');

class LogModel extends CI_Model { 

    public function __construct(){
		parent::__construct();
		$this->load->database();
	}
	
	function get_rows($where)
    {
		$sql = "select * from logs_tb where id > 0 and isDeleted = 0 ".$where;
		$query = $this->db->query($sql);
		return $query->result_array();
	}

	public function insert_row($insert_data)
	{
		$this->db->insert('logs_tb', $insert_data);
	}

	function delete_row($edit_id)
    {		
		$this->db->delete('logs_tb', array('id' => $edit_id));
	}

	public function update_row($update_data, $id)
	{
		$this->db->update('logs_tb', $update_data, $id);
	}	
}