ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Query Module

May 18, 2011 4:15pm

Subscribe [3]
  • #1 / May 18, 2011 4:15pm

    Philip Zaengle

    293 posts

    I’m doing the following query with the query module:

    {exp:query limit="2" paginate="both" sql="SELECT member_id FROM exp_members" }
        
                Hello: {member_id} <br>
                
                {paginate}
                    Page {current_page} of {total_pages} pages {pagination_links}
                {/paginate}
            
    {/exp:query}

    Note the pagination and the limit.

    The pagination links are generated - but they don’t effect they query at all. it’s like the offset isn’t being applied.

    Any suggestions?

  • #2 / May 18, 2011 4:17pm

    Philip Zaengle

    293 posts

    Oh, this is on EE 2.1.3

  • #3 / May 18, 2011 5:00pm

    Mark Bowen

    12637 posts

    I just tried your exact same code on a standard install of ExpressionEngine (admittedly 2.1.4) and it worked fine.

    Do your pagination links look correct?

    Best wishes,

    Mark

  • #4 / May 18, 2011 5:18pm

    Philip Zaengle

    293 posts

    yep - they look correct. and they change the URL to the correct page - it’s just not reflected in the query.

  • #5 / May 18, 2011 5:31pm

    Mark Bowen

    12637 posts

    A few more questions then :

    1 - Do you have more than 2 members in the database?
    2 - Have you tested this code in a template all on its own +
    3 - If not then is this query nested inside of any other tags at all?
    4 - Do you have any add-ons, most notably extensions that have anything to do with pagination or anything else that might be affecting this?

    Best wishes,

    Mark

  • #6 / May 18, 2011 5:35pm

    Philip Zaengle

    293 posts

    1: Yes - several hundred
    2: Yes - same results
    3: Nope - it’s all by itself.
    4: good thought. I’ll check.

  • #7 / May 19, 2011 5:47am

    John Henry Donovan

    12339 posts

    Philip,

    I can confirm it also works for me on EE2.1.3. I know Structure has been having some issues affecting the native pagination. If you have that installed try disabling just the Structure extension and nothing else.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases