Pagination Problem Help me ... |
[eluser]Sathishkumar[/eluser]
Hi, Iam newbie in CI. Pagination problem to my site ... its my code Controller : Code: $this->load->model('excute'); View : Code: <?php Model Code: function get_course2() Please anybody Help Me....
[eluser]SpooF[/eluser]
I'm going to take a guess at this and say that the links aren't working. The reason most likely being is that your not setting a uri_segment. It seems this is the number one cause of problems with the pagination class.
[eluser]Sathishkumar[/eluser]
Pagination links created but shows all rows ... http://i46.tinypic.com/s33ibl.jpg
[eluser]SpooF[/eluser]
This probably has something to do with your model and not the pagination class. The pagination class doesn't control how many entries to display. It simple gives you a starting point for your query.
[eluser]Sathishkumar[/eluser]
[quote author="saidai jagan" date="1261593378"]post u r model function[/quote] model function : Code: function get_course2()
[eluser]saidai jagan[/eluser]
Code: $ddata['course'] = $this->excute->get_course2($config['per_page'],$this->uri->segment(3));
[eluser]Sathishkumar[/eluser]
show's following error.... http://i49.tinypic.com/2akfyap.jpg Code: A PHP Error was encountered Code: A PHP Error was encountered Code: A PHP Error was encountered Code: A Database Error Occurred 55th line is : Code: function get_course2($perpage,$start='0') 59th line : Code: $query = $this->db->query("SELECT * FROM course WHERE course_no_of_seats > course_enroll_no LIMIT $start , $perpage");
[eluser]saidai jagan[/eluser]
will u post u r LATEST controller function and Model function ? |
Welcome Guest, Not a member yet? Register Sign In |