<?php 
class imports_model extends CI_model
 {
   
	

		function get_imports($rec_no)
		{
		  $this->db->order_by("id", "desc"); 
		  $query=$this->db->get('imports',$rec_no,$this->uri->segment(3)); // select * from posts where module='$type'  limit $rec_no
		  
		  if($query->num_rows() > 0)
		    return $query->result(); 
		     return FALSE;

		}
		
		function get_num_imports()
		{
		  $query=$this->db->get('imports'); // select * from posts where module='$type' 
		  if($query->num_rows() > 0)
		    return $query->num_rows(); 
		     return FALSE;
		}

		function show_import($id)
		{
		   $this->db->where('id',$id);
		  $query=$this->db->get('imports'); // select * from posts where module='$type' 
		  if($query->num_rows() > 0)
		    return $query->result();  
		     return FALSE;
		}


		
		
	
	

}
