[eluser]praveenarya[/eluser]
hi all,
my code in controller is
Code:
function index(){
$this->load->library('pagination');
$config['base_url'] = current_url();
$fff=$config['uri_segment'] = 4;
$config['total_rows'] = $this->db->count_all('ab_bus_location');
$kkk=$config['per_page'] = 3;
$config['full_tag_open'] = '<p>';
$config['full_tag_close'] = '</p>';
$data['results']=$this->db->query("select * from ab_bus_location where 1 order by loc_id desc limit $kkk ");
$this->load->view('admin/manage_location',$data);
and in view page
Code:
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCFCFD" class="sborder">
<tr>
<td width="5%" nowrap="nowrap" class="menuheading">S.No </td>
<td width="65%" height="25" class="menuheading">Loaction</td>
<td width="10%" align="center" class="menuheading">Status</td>
<td width="10%" align="center" class="menuheading">Edit</td>
<td width="10%" align="center" class="menuheading">Delete</td>
</tr>
<?
$i=0;
foreach ($results->result_array() as $row)
{
$i=$i+1;
if($row['loc_status']==0) {
$fs="In-Active"; $sf=1;$color="red";
}else{
$fs="Active"; $sf=2;$color="green";
}
?>
<tr bgcolor="#FFFFFF">
<td align="center"><? echo $i; ?>.</td>
<td height="25" align="left" class="capfont"><? echo $row['loc_name'];?></td>
<td width="10%" align="center"><a href="<? echo base_url();?>index.php/admin/Manage_location/status/<?php echo $row['loc_id']?>/<? echo $row[" class="insub"><font color="<?=$color?>"><?= $fs;?> </font></a></td>
<td align="center"><a href="<? echo base_url();?>index.php/admin/Manage_location/edit/<?php echo $row['loc_id'];?>" class="insub">Edit</a></td>
<td width="15%" align="center"><a href="<? echo base_url();?>index.php/admin/Manage_location/delete/<?php echo $row['loc_id'];?>" class="insub">Delete</a></td>
</tr>
<? } ?>
<tr bgcolor="#FFFFFF">
<td height="25" colspan="5"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><?
echo $this->pagination->create_links();
?></td>
</tr>
</table></td>
</tr>
</table>
i cant see any links though it is working fine with limit per page
thanks in advance