Welcome Guest, Not a member yet? Register   Sign In
it is not paginating me, humm, dunno why :(
#10

[eluser]number1chump[/eluser]
Been looking now into your example with detail. Nice and insightful to me.

I can clearly see how you obtain from the controller the total number of rows having calculated that in the Models, by calling the model AND the function in the Model which makes that calculation which is basically a core function from Active Records.

You also use Active Records to set the Limit and Offset, although you dont hardcode the numbers but set them as variables.
Then when configuring the parameters for the pagination you are pointing to the controller page AND the function of the controller which contains the pagination functions.

Then to obtain the data you call the Model and the function within that Model and also set that the pagination link will be on the third segment of the URI.

Then once you have setup the parameters of the pagination you actually call the pagination class and finally haul all that data to the View passing it as the second parameter.

Then the view echoes it.

My stuff could not work because simply the echoing was being done before the pagination, it was made in the Model, although I did (and so I indicated it at the beginning of my Posting) try all combinations and that included echoing it in the Controller (which again should not be done because that is what the View is for).

Like I say, yes some functions of Active Records are handy, but I prefer to stick to native SQL particularly when it comes to complex joins. I am reluctant to replace also the most simple this

Code:
select * FROM table_name

by this: $this->db->get('table_name');


Messages In This Thread
it is not paginating me, humm, dunno why :( - by El Forum - 01-11-2011, 05:35 AM
it is not paginating me, humm, dunno why :( - by El Forum - 01-11-2011, 06:08 AM
it is not paginating me, humm, dunno why :( - by El Forum - 01-11-2011, 06:26 AM
it is not paginating me, humm, dunno why :( - by El Forum - 01-11-2011, 10:19 AM
it is not paginating me, humm, dunno why :( - by El Forum - 01-11-2011, 12:58 PM
it is not paginating me, humm, dunno why :( - by El Forum - 01-11-2011, 01:14 PM
it is not paginating me, humm, dunno why :( - by El Forum - 01-11-2011, 01:25 PM
it is not paginating me, humm, dunno why :( - by El Forum - 01-11-2011, 01:46 PM
it is not paginating me, humm, dunno why :( - by El Forum - 01-11-2011, 02:19 PM
it is not paginating me, humm, dunno why :( - by El Forum - 01-12-2011, 10:39 AM
it is not paginating me, humm, dunno why :( - by El Forum - 01-22-2011, 03:39 PM
it is not paginating me, humm, dunno why :( - by El Forum - 01-23-2011, 05:04 AM
it is not paginating me, humm, dunno why :( - by El Forum - 01-30-2011, 04:20 PM
it is not paginating me, humm, dunno why :( - by El Forum - 01-30-2011, 06:58 PM
it is not paginating me, humm, dunno why :( - by El Forum - 01-31-2011, 12:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB