Welcome Guest, Not a member yet? Register   Sign In
problem with pagination
#1

[eluser]praveenarya[/eluser]
hi all,
i am having problem with pagination i did as explained in user guide but iam getting errors my code is
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>
                &lt;?
                     $i=0;

                    $query("select * from ab_bus_location where 1  order by loc_id desc");
$total=$query->num_rows();
                    foreach ($query->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";
                        }
                  ?&gt;
                <tr bgcolor="#FFFFFF">
                  <td align="center">&lt;? echo $i; ?&gt;.</td>
                  <td height="25" align="left" class="capfont">&lt;? echo $row['loc_name'];?&gt;</td>
                  <td width="10%" align="center"><a href="&lt;? echo base_url();?&gt;index.php/admin/Manage_location/status/&lt;?php echo  $row['loc_id']?&gt;/&lt;&lt;? echo $sf; ?&gt;" class="insub"><font color="&lt;?=$color?&gt;">&lt;?= $fs;?&gt; </font></a></td>
                  <td align="center"><a href="&lt;? echo base_url();?&gt;index.php/admin/Manage_location/edit/&lt;?php echo  $row['loc_id'];?&gt;" class="insub">Edit</a></td>
                  <td width="15%" align="center"><a href="&lt;? echo base_url();?&gt;index.php/admin/Manage_location/delete/&lt;?php echo  $row['loc_id'];?&gt;" class="insub">Delete</a></td>
                </tr>
                &lt;? }  ?&gt;
                <tr bgcolor="#FFFFFF">
                  <td height="25" colspan="5"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td align="center">&lt;?  if($total>0) {
                        $this->load->library('pagination');

$config['base_url'] = current_url();
$config['total_rows'] = $total;
$config['per_page'] = '2';

$this->pagination->initialize($config);

echo $this->pagination->create_links();
                         } else { echo "---- No Records Found ----"; }?&gt;</td>
                      </tr>
                  </table></td>
                </tr>
                
            </table>


i gor error
Severity: Notice

Message: Undefined property: CI_Loader::$pagination

Filename: admin/manage_location.php

Line Number: 125
Fatal error: Call to a member function initialize() on a non-object in D:\wamp\www\example\system\application\views\admin\manage_location.php on line 125


plz help me
thanks in advamce


Messages In This Thread
problem with pagination - by El Forum - 08-31-2009, 04:42 AM
problem with pagination - by El Forum - 08-31-2009, 05:03 AM
problem with pagination - by El Forum - 08-31-2009, 05:14 AM
problem with pagination - by El Forum - 08-31-2009, 05:29 AM
problem with pagination - by El Forum - 08-31-2009, 05:50 AM
problem with pagination - by El Forum - 08-31-2009, 05:54 AM
problem with pagination - by El Forum - 08-31-2009, 05:55 AM
problem with pagination - by El Forum - 08-31-2009, 06:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB