<?php
class Loginmodel extends CI_Model{
	
/*default functions*/
public function common_fetch($table,$where){
	$this->db->where($where);
	$this->db->order_by('id','desc');
	$query = $this->db->get($table);
	return $query->result_array();
}
public function common_insert($table,$data){
	$this->db->insert($table,$data);
	$id = $this->db->insert_id();
	return $id;
}
public function common_update($table,$data,$where){
	$this->db->where($where);
	$this->db->update($table,$data);
}
public function common_delete($table,$where){
	$this->db->where($where);
	$this->db->delete($table);
}
/*default functions*/

}
?>