[eluser]srajibtechno[/eluser]
i am facing this problem... i am attahced my code here please check it...
i want to add pagination here. i am passing cat_id as a parameter using URL.... how can i add pagination here.... please help me as soon as possible....
My model:
function show_mix_gallery_IT()
{
$this->db->select('*');
$this->db->from('inbook_mix_gallery_sub_category');
$this->db->where('cat_id','1');
$query = $this->db->get();
return $query->result();
}
My Controller:
function IT_details($id)
{
$data['query']=$this->get_model->show_mix_gallery_details($id);
$data['query2']=$this->get_model->show_mix_gallery_category($id);
$this->load->view('inbook_magazine_inner3',$data);
}
and My view is:
<?php
$i=0;
foreach($query->result_array() as $row_)
{
$i++;
?>
<tr >
<? if($row_['mix_gallery_image']==0)
{
?>
<img src="<?=base_url()?>assets/images/<? echo $row_['mix_gallery_image'];?>" align="middle">
<div style="margin-left:15px;margin-right:15px;">
<font color="black">
<? echo $row_['mix_gallery_details'];?>
</font> </div>
<br />
</tr>
<? }
else {?>
<div style="margin-left:15px;margin-right:15px;"> <font color="black"> <? echo $row_['mix_gallery_details'];?> </font> </div>
<? }}
?>