This topic is locked

Button to process Results?

11/25/2014 8:41:20 AM
PHPRunner General questions
dermemo author

While the Tutorial below is good if you select the Entries to process...
http://xlinesoft.com/phprunner/docs/update_multiple_records.htm
I need the correct Code for Buttons in order to process all Results, just like the Export Results Function works.
For instance, i have 1000 Entries in the Database, i filter those and get 100 Results, how can i process those 100 Results with a Button now?
Any Help is appreciated!

Sergey Kornilov admin 11/25/2014

You need to select all those records first. Check this article for inspiration:

http://www.asprunner.com/forums/topic/21835-how-to-select-certain-rows-on-list-page-programmatically/

dermemo author 11/26/2014

Thanks for the Answer but i think i did not explain it good enough.
You example requires to programatically define those entries that are Horsepower > 200, and then autoselects those.
Let me explain:
When i have 1000 Entries on the Listpage i allready can Filter those with the given function of the Filter Tab, or for example i could search for a certain Entries...which limits the Number of Results....

There must be a Function/Method that handles those Results...because the Export Function allready uses exactly those Results...
something like:
while ( $data = $button->getAllResults() ) {

$sql = "Update employees set ReportsTo='Bob Smith' where KeyField=".$data["KeyField"];

CustomQuery($sql);

}