limit the list in master-detail page to detail records

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
kurt2000
User
Posts: 43

limit the list in master-detail page to detail records

Post by kurt2000 »

how can i limit the list in master-detail page to detail records

thankx


mobhar
User
Posts: 11745

Post by mobhar »

Use "Recordset_Selecting" server event that belongs to detail table in order to filter the recordset based on the number of records you desire.


kurt2000
User
Posts: 43

Post by kurt2000 »

i mean how can i put record limit like 100 records for listing detail page


danielc
User
Posts: 1601

Post by danielc »

If you use MySQL, use LIMIT to return specific number of records, see dev.mysql.com/doc/refman/5.0/en/select.html.


kurt2000
User
Posts: 43

Post by kurt2000 »

i am using postgresql 9.3 with postgis
and in view state it is impossible to use limit functions with spatial queries

of course i know how to do it in db but i ve to do it in phpmaker cause queryy sends me 4000 row that kills the page

if any one knows it pls help


mobhar
User
Posts: 11745

Post by mobhar »

You don't have to limit too strict only 100 records for the listing page. However, as suggested before, try to use "Recordset_Selecting" by customizing the $filter parameter in the server event. For example, you may display only the records that match with your criteria filter, such as display all records that have the datetime of last updated yesterday only, etc.

Read "Server Events and Client Scripts" in the help file for more information.


kurt2000
User
Posts: 43

Post by kurt2000 »

hmm ok
that meas if i create seq in view and $seq_di < 100 is enough
thx alot


edigital
User
Posts: 5

Post by edigital »

How about to use database "view" (with only few records) instead table on listmaster ?

Problem is when you try to edit/add on that view..??? mmm


edigital
User
Posts: 5

Post by edigital »

mobhar wrote:
You don't have to limit too strict only 100 records for the listing page.
However, as suggested before, try to use "Recordset_Selecting" by
customizing the $filter parameter in the server event. For example, you may
display only the records that match with your criteria filter, such as
display all records that have the datetime of last updated yesterday only,
etc.

Read "Server Events and Client Scripts" in the help file for more
information.

Filter with LIMIT doesn't work...you must use another one...


edigital
User
Posts: 5

Post by edigital »

danielc wrote:
If you use MySQL, use LIMIT to return specific number of records, see
dev.mysql.com/doc/refman/5.0/en/select.html.

LIMIT filter doesn't work on Master/Detail list because LIMIT is already defined on number of records per page...


mobhar
User
Posts: 11745

Post by mobhar »

edigital wrote:
Filter with LIMIT doesn't work...you must use another one...

Yes, that's why I recommend to use "Recordset_Selecting" server event to modify the $filter that match with the search/filter criteria.


Post Reply