hi..
i have notice this code in the documentation.
{exp:query limit="5" sql="SELECT title,entry_date FROM exp_weblog_titles ORDER BY entry_date DESC"}
{title} - {entry_date format="%Y %m %d"}
{paginate}
Page {current_page} of {total_pages} pages {pagination_links}
{/paginate}
{/exp:query}
but i notice that if i query the members i cannot use the limit and pagination. can i use this code?
{exp:query limit="1" pagination="bottom" sql="SELECT screen_name FROM exp_members WHERE member_id = '1' "}
cause the actual code is {exp:query sql="SELECT screen_name FROM exp_members WHERE member_id = '1' "} i cannot limit the entries. thanks..
here’s my code
{exp:query sql="SELECT * FROM exp_members ORDER BY member_id DESC LIMIT 1"}
{if photo_filename != ''}
/cnchs/images/member_photos/{photo_filename}
{if:else}
/cnchs/images/member_photos/no_pic.gif
{/if}
<a href="http://localhost/cnchs/index.php/member/{member_id}">{screen_name}</a>
{paginate}
Page {current_page} of {total_pages} pages {pagination_links}
{if previous_page}
<a href="http://{auto_path}">Previous Page</a>
{/if}
{if next_page}
<a href="http://{auto_path}">Next Page</a>
{/if}
{/paginate}
{/exp:query}
this is the pagination the only works
{paginate}Page {current_page} of {total_pages} pages {pagination_links}
{/paginate}
there is no link to go to the other entries. unlike in the weblog and comment that pagination perfectly works.
slapshotw is right! My mistake. Pagination works with the query tag for members as well. Here’s something I just came up with.
{exp:query limit="3" paginate="both" sql="SELECT * FROM exp_members ORDER BY member_id DESC"}
{screen_name}<br>
{paginate}
Page {current_page} of {total_pages} pages {pagination_links}
{/paginate}
{/exp:query}
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.