[SOLVED] ?orderby=dproperty_price |
5/15/2010 3:35:39 PM |
PHPRunner General questions | |
![]() I have done this a thousand times w/ the old search functionality prior to v5.2 but w/ this new search implementation some of my links are not sorting correctly when I append ?orderby=dproperty_price at the end of them. Here is one example: http://www.greersferrylake.net/cms/property_database_list.php?ctlSearchFor=&simpleSrchTypeComboNot=&a=integrated&id=1&criteria=and&type1=&value11=Lakefront+Homes&field1=property_category&option1=Equals¬1=&orderby=dproperty_price&pagesize=50"]http://www.greersferrylake.net/cms/property_database_list.php?ctlSearchFor=&simpleSrchTypeComboNot=&a=integrated&id=1&criteria=and&type1=&value11=Lakefront+Homes&field1=property_category&option1=Equals¬1=&orderby=dproperty_price&pagesize=50
|
|
J
|
Jane 5/18/2010 |
Cotton, if (@$_REQUEST["orderby"]) |
![]() |
powersitedesign author 5/20/2010 |
Cotton, unfortunately simple orderby parameter in the URL won't be processed. You need to click on the column header to sort records on the page or add ORDER BY statement to the SQL query manually. Here is a sample "List page: Before SQL query" event: if (@$_REQUEST["orderby"])
|
![]() |
powersitedesign author 6/12/2010 |
I went in and added this to the List Page: Before SQL Query
|
![]() |
Sergey Kornilov admin 6/14/2010 |
As error message say you are missing a closing curly brace at the end of this code snippet. |
![]() |
powersitedesign author 6/15/2010 |
Sergey - <?php |
![]() |
powersitedesign author 6/15/2010 |
Sergey - |
![]() |
powersitedesign author 6/16/2010 |
This is now resolved. I went into the database and noticed that the property_price field was inadvertantly set the varchar. I changed that and it immediately started working. Apparently that was the issue. I now have the script to validate currency for that field (which I should have done in the first place). Thanks for looking at it though, I am marking this issue closed but hopefully you can leave it in case someone else runs into this in the future. |