This topic is locked

BeforeProcessRowList and record_count

7/15/2008 2:38:29 AM
PHPRunner General questions
Pfeiffer author

Hello,
I still use PHPRunner 4.1 (will update to 4.3 whenever <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=8987&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' />

It's possible to use BeforeProcessRowList not to show records in list view by returning the value false.
But the counter of list page still shows the numer of all records, althougt some records are suppressed.
Can I correct the value of record-count, so the customers gets a right value of record_count ?
Best regards

Uwe Pfeiffer

J
Jane 7/15/2008

Uwe,
you can calculate number of records manually.

Here are some tips:

  1. set up new $_SESSION["recordsfound"] variable in the List page: Before process event:
    $_SESSION["recordsfound"] = 0;



2. increase $_SESSION["recordsfound"] in your BeforeProcessRowList event if needed.

3. assign correct number of record on the List page: Before display event and clean $_SESSION["recordsfound"] variable:

$smarty->assign("records_found",$_SESSION["recordsfound"]);

$_SESSION["recordsfound"] = 0;