ODBiC Discussion Board


RE: Order By in your select., Max Steiner, 10-19-2006

Actually there is a better of doing it...

by David Richardson, November 4, 2006 09:22

You can avoid the multiple IF statements by setting the field you want to order by in your hyperlink thus:

<a href="sample.tpl?sortby=product_id">Product</a>
<a href="sample.tpl?sortby=category_cd">Category</a>

<!--SELECT * from xxx Order by $sortby$;--> <!--EACHROW-->

<!--ENDROW-->



Replies:


Post Your Reply:

Name   
E-mail  optional
Topic  
Message:

HTTP Link: 
Link text: 

          


Copyright ©1997-2003, Roger Harris. All rights reserved.