List shows top 30 records only

A place for users and developers of the Xataface to discuss and receive support.

Postby zopemgr » Fri Apr 21, 2006 11:07 am

I have more than 30 entries in my database, yet only the top 30 show up on the list. The title shows "Found 44 of 44 Records in table employee." but only 30 are displayed. Can I configure Dataface to show all records found in the listing page?
zopemgr
 
Posts: 66
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Fri Apr 21, 2006 11:33 am

Notice that, at the top of the page there is a little text box where it says: "Display xxx records per page". If you enter a larger number in here, it will show that many records per page. This is also configurable using the "-limit" GET parameter. i.e., if you append "-limit=100" to the url then it will show 100 records per page.

Just want to make sure that you noticed the "Next" and "Previous" links at the top right and left (respectively) of the page that will allow you to page through the results. I chose 30 records per page as a default because it is a good number that will yield decent performance yet still give the user a fair amount to look at. Certainly there must be a limit because some people are running tables with 500,000 records - that would be unfeasible to show on one page and the application would be slow as molasses.

OK, give that there must be a limit on the number of records to display per page, you can change the default by adding the following snippet to the beginning of your application's index.php file:

Code: Select all
if ( !isset( $_REQUEST['-limit']) ){
    $_REQUEST['-limit'] = 100;
    $_GET['-limit'] = 100;
}


The above code would make the default limit 100 records per page.


Hope this helps.

Best regards

Steve Hannah
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 33 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved