Welcome Guest, Not a member yet? Register   Sign In
Datamapper and pagination
#8

[eluser]WanWizard[/eluser]
The problem might be here that you're using a count() query in combination with a group_by.

get_paged() runs two queries, one to determine the number of rows in the result, and one to actually get the rows for the required page.

For the first query, all select() and order_by() clauses are stripped, since they are not relevant for a count query. Unless you already have a query with a count() constructed, in which case this goes horribly wrong (as your grouping will no longer work).

Can you enable profiling, and post the SQL of the count query generated for this get_paged() call?


Messages In This Thread
Datamapper and pagination - by El Forum - 04-16-2013, 06:40 AM
Datamapper and pagination - by El Forum - 04-16-2013, 09:11 AM
Datamapper and pagination - by El Forum - 04-19-2013, 08:12 AM
Datamapper and pagination - by El Forum - 04-19-2013, 09:52 AM
Datamapper and pagination - by El Forum - 04-19-2013, 10:24 AM
Datamapper and pagination - by El Forum - 04-19-2013, 12:26 PM
Datamapper and pagination - by El Forum - 04-19-2013, 01:26 PM
Datamapper and pagination - by El Forum - 04-20-2013, 03:56 AM
Datamapper and pagination - by El Forum - 04-20-2013, 10:16 AM
Datamapper and pagination - by El Forum - 04-22-2013, 06:14 AM
Datamapper and pagination - by El Forum - 04-22-2013, 08:35 AM
Datamapper and pagination - by El Forum - 04-24-2013, 11:58 AM
Datamapper and pagination - by El Forum - 04-24-2013, 01:58 PM
Datamapper and pagination - by El Forum - 04-24-2013, 08:40 PM
Datamapper and pagination - by El Forum - 04-24-2013, 11:34 PM
Datamapper and pagination - by El Forum - 04-25-2013, 01:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB