This topic is locked

get max page

2/28/2012 2:58:35 AM
PHPRunner General questions
C
chanpeter88 author

I am working on php 6.0.

How can I know the max page value ? Can I get it in list page : before sql query event ?

C
cgphp 2/28/2012

In the "Before display" event:

$xt->getvar("maxpages");
C
chanpeter88 author 2/28/2012

Can I conditionally change value on "records per page" ? Which event can do it and what script ?

Sergey Kornilov admin 2/28/2012

You can use session variables for this purpose:

$_SESSION["Cars_pagesize"]=50;


Replace Cars with the actual table name. More info:

http://xlinesoft.com/phprunner/docs/phprunner_session_variables.htm

C
chanpeter88 author 2/28/2012

two question for listpage : beforesqlquery event

Q1.
I add some condition to whereadd(...) . How can I get total no of records ?
Q2.
I want to show limited records . e.g where a = 'active' limit 3 . How can I do in before sql query event?