This topic is locked
[SOLVED]

 Set sort order in initial query

5/8/2010 10:37:50 AM
PHPRunner General questions
author

Hi,
Is there a way to set a sort order on a search query passed as a URI? For example, I drop users into a list after they have signed in. The list is the result of a query, such as :
http://foo.com/foo_list.php?ctlSearchFor=BAR&simpleSrchTypeComboNot=&a=integrated&id=1&criteria=and
This returns a list that starts with the oldest entry first. I want to display the most recent entry first, so I tried adding
&orderby=dDatePosted
but that is ignored.
Do I have to code a specific SQL query, or is there a parameter I can add to the URI to invoke the sort order?
THANKS

F
funklet 5/8/2010

Hi,
If the page is directly after login then you can set the default sort order in the query page. Depending on the version of PHPRunner you are using you should be able to do this in the GUI, please see the help section for your version for more info.
There is a couple of posts later on in the following thread that deal with sort order in PHPRunner:
http://www.asprunner.com/forums/topic/14006-how-to-specify-sort-field/
If you are using the after login event to send the user to the page then you need not enter anything in the QueryString.
The short answer to your question is I think the sort parameters are in the page and the QueryString is ignored for sorting.
I hope this helps..
Kind regards.

5900 5/16/2010

Thanks.
I figured it out. Really simple. Just hit the query designer and specify the sort order.



Hi,
If the page is directly after login then you can set the default sort order in the query page. Depending on the version of PHPRunner you are using you should be able to do this in the GUI, please see the help section for your version for more info.
There is a couple of posts later on in the following thread that deal with sort order in PHPRunner:
http://www.asprunner.com/forums/topic/14006-how-to-specify-sort-field/
If you are using the after login event to send the user to the page then you need not enter anything in the QueryString.
The short answer to your question is I think the sort parameters are in the page and the QueryString is ignored for sorting.
I hope this helps..
Kind regards.