CodeIgniter Forums
Chronological order of data base on the date - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: Best Practices (https://forum.codeigniter.com/forum-12.html)
+--- Thread: Chronological order of data base on the date (/thread-72270.html)

Pages: 1 2


RE: Chronological order of data base on the date - jelz2018 - 12-09-2018

I got 4 pages now sir instead of 2 pages. And again the last entry of the previous page repeats on the next page. I hope you can help me with this. I highly appreciated your help sir.


RE: Chronological order of data base on the date - jelz2018 - 12-09-2018

(12-07-2018, 11:11 AM)jreklund Wrote: That's strange. It dosen't stop the loop. How many pages did you get? More than 3 I take it?
Just for the sake of it. Try your code and delete the extra <tr> inside your if statements. In case I made an error on my if statement.

Now it's working sir. Remove the extra tr and td. But the problem is that now my first page is limited to 10 entries the 2nd page got 19 and the last page is 5 which it could be only to pages only. I would like to have 18 entries on the 1st page and this would be arrange by date. The oldest date would be the 1st entry and so on. Waiting for your help sir. Thanks in advance.


RE: Chronological order of data base on the date - jelz2018 - 12-09-2018

Sir it's working now perfectly I just forgot to remove $i++ after I remove it it's working perfectly. I'm very thankful to you sir. God bless you.