Links within paginated results |
[eluser]Jst4Fun[/eluser]
Hi, I am quite new to CI. I am trying to create a list with pagination. I am using CI's pagination class to accomplish the same. I was following this Pagination tutorial to implement pagination in my project. I am having certain requirements while displaying the results. Even though there are five fields in the database table I only require data of two fields. They are Name and address. The results should also contain two other col which contains link like edit and delete. So resulting html table should be as follows (sorry the alignment is not correct): SlNo | Name | Address | Edit | Delete _________________________________________________________ 1 | Test 1 | This is Test |Edit | Delete So I need to display a serial number (Not from database. Automatically incremented by 1). Name and Description from the database (I was able to display those data successfully), Edit is supposed to be a link which would be directed to index.php/userslist/edit/<id> and delete would also be a link like index.php/userslist/delete/<id>. I am not sure how to add SlNo, edit and delete to the paginated results. Here is the code I have done controller Code: <?php model Code: public function get_users_list($num, $offset){ view Code: <?php echo $this->table->generate($results); ?> I hope someone would help me. Thanks |
Messages In This Thread |
Links within paginated results - by El Forum - 12-31-2007, 04:32 AM
Links within paginated results - by El Forum - 01-01-2008, 10:17 PM
Links within paginated results - by El Forum - 01-01-2008, 10:58 PM
Links within paginated results - by El Forum - 01-02-2008, 05:04 AM
Links within paginated results - by El Forum - 01-02-2008, 02:42 PM
Links within paginated results - by El Forum - 01-02-2008, 10:27 PM
Links within paginated results - by El Forum - 04-12-2010, 12:40 PM
|