• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Ah-ha! The problem is that count_all_results() is not ignoring the limit clause like I thought it would, so it will only find three results every time, which breaks the pagination on the second page, because the result number is more than the total number of results.

If you can post your model method, I can make those final modifications. Or you can make them yourself. Just ensure that this line:
$total_results = $this->db->count_all_results('articles');

appears before the limit and order_by statements. That should fix it. Big Grin

I love you! it works! Smile Finally, Wooohaaaa!

I don't think it's working as expected. On the first page, there should be three results and a pagination section which should lead to the forth result. There should be four results as clanky contains 3 results, and recenzie contains 1 (I see you've removed the test entry).

http://www.fotoramik.sk/blog/kategoria/3 shows the final result, but there's no pagination... :/

Also, your database query is ordering the results by date descending twice.
SELECT `id`, `odkaz`, `title`, `picture`, `text`, `date`
FROM (`articles`)
WHERE `kategoria` = 'clanky'
ORDER BY `date` desc, `date` desc #<-- Here

Fixed the desc date, plus added test article and it works fine with me, doesn't it?

I mean on the initial page when no category is specified.
http://www.fotoramik.sk/blog/kategoria. There should be a pagination section at the bottom of the page and there isn't. Very strange...

That is on purpose as I implemented this:

If ($category):
         $data['links']       = $this->pagination->create_links();

until I decide to put anchor of http://www.fotoramik.sk/blog/kategoria on the website. -> Which I should do, but haven't decided where to put it yet Smile

Aaah, OK. As long as it's intentional. Smile

Glad you finally got it sorted. Sorry for any extra hassle I've caused, but hopefully you've learnt something today. I know I have! Thanks for being so patient, and good luck with your Web site. It looks awesome. If I was even half as talented as you with visual design, I'd be very, very happy.

Hei fero, can you post your code?

I'm also have problems with pagination.

*still learning english

what is the solution lab assisstance? i am facing same problem....

please help me...as soon as possible....

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.