This topic is locked

Sort descending first

10/27/2007 11:59:18 PM
PHPRunner General questions
O
osluk author

How can i alter the functionality of the search so descending sorted data is shown first.
Often a field will not be partly populated so showing blanks first can be confusing.

Unless there is a way to hide records with a null entry in the field being sorted.
In my simple solution showing descending first displays meaningful data first.
This link shows the number of cases produced in descending order.
http://www.bordeauxreport.com/db-2007/view...Number+of+cases
This one displays the 5 records with an in bottle tasting note present
http://www.bordeauxreport.com/db-2007/view...+Bottle+Note+BR
Cheers Chris

Sergey Kornilov admin 10/28/2007

Sort order can be set on SQL query tab in PHPRunner. You can set it to be descending or ascending.

O
osluk author 10/28/2007

Thanks Sergey,

Perhaps I can explain this better.
When the column heading is first clicked on it jumps to this page (ascending order sort page)

http://www.bordeauxreport.com/db-2007/view...+Bottle+Note+BR
When clicked on again it jumps the following (descending order sort page)

http://www.bordeauxreport.com/db-2007/view...+Bottle+Note+BR
This is coded as follows in the HTML

<A class=tablelinks href="Wine_Data_list.php?orderby={$order_dir_In_Bottle_Note_BR}In+Bottle+Note+BR">In Bottle Note</A>
I have no idea how you code this to link to the ASC sort page and less idea how by clicking again the sort is reveresed but it would be cool for me if I could go first to the DESC sort order.
Cheers Chris

O
osluk author 11/2/2007

It would be great if someone could let me know how to address this query.
When the heading is first clicked on - sort by DESC first currently sort ASC
Cheers Chris

O
osluk author 11/7/2007

Anyone know how to address this.
Sort by ASC first shows all the zero garbage values - it would be really cool to go to the DESC search first.
Thanks Chris
This is a much beter view for me first DESC first click


This is the ASC click shows the zero values

J
Jane 11/8/2007

Chris,
you can do it editing generated ..._list.php file manually.

Find this code:

$smarty->assign("order_dir_FieldName","a");

and replace it with this one:

$smarty->assign("order_dir_FieldName","d");