This topic is locked
[SOLVED]

 Filter ListPage on button click

12/8/2014 12:13:15 PM
PHPRunner General questions
T
tk_fire author

I am very new to PHP, MySQL and PhpRunner but am learning a lot but can not seam to figure out how to do something that seams like it should be pretty simple - filter the ListPage results after the users clicks a button.
As a simple example - a list of Sales Records for All Departments is displayed on the list page when it first loads, I want to provide the user the option to narrow down the list to a single department by clicking one of the buttons that I've added to the top of the page. When the users clicks the button I want to then build the proper sql statement, re-query the database for newly selected data and redisplay the list.
I know I can redirect the user to another page where I already know the URL of using
location.href "myuerl.com";
but I want to build some more sophisticated choices using sql statements and can not figure it out - if it is even possible.
I hope I have explained this well enough
Using PHPRUnner 8 Build 23092 x64
Thanks

Sergey Kornilov admin 12/9/2014

You can filter list page redirecting user to specific search results URL. No need to run SQL queries manually.
Check this article for inspiration:

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

T
tk_fire author 12/10/2014



You can filter list page redirecting user to specific search results URL. No need to run SQL queries manually.
Check this article for inspiration:

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


Thank you so much - this helped. I've now been able to create a new table in my database that stores the most frequently used Filters for each list page. I've saved the Filter from the URL and given them a short name for the users, I can then load them into the List Box so the users do not have to manually build the filter each time they need to see the list pages, they can just select the list of saved filters.
Is there a reference of the syntax used for the filters that are built using Advanced Search. I would like to do things like (Date > 6 Months Ago).
Thanks Again
Tim