Not sure if this is a bug. But looks like an issue with the code.
In libs/search.php ,
the code is:
if(isset($this->orderBy)){
$this->orderBy = "ORDER BY " . $this->orderBy;
}
When I call it like this .. the this->sql gets multiple ORDER BY in it .. for eg " .... ORDER BY ORDER BY link_vote" ...
So I modified the code to :
if(isset($this->orderBy) && (strstr($this->orderBy, 'ORDER') === false)){
$this->orderBy = "ORDER BY " . $this->orderBy;
}
and it works fine now.
You guys will know best but I think theres a possibility that this->orderBy variable is set multiple times and we get multiple ORDER BY additions to the sql string.
The code I used:
include_once(mnminclude.'search.php');
global $new_search;
$search=new Search();
$search->filterToStatus = 'all';
$search->orderBy = " link_votes ";
$search->doSearch();
$new_search = $search->new_search();
require_once("libs/link_summary.php");
![]() |
| | LinkBack | Thread Tools | Display Modes |
| ||||
|
__________________ India Digg : News from users |
| ||||
|
Can you give us an example sql query in pligg where you noticed there being 2 order by's?
__________________ I accept donations for my time helping users like you on the forum and IRC. |
| ||||
|
Actually I posted the code in my prev post. Its: The code I used: include_once(mnminclude.'search.php'); global $new_search; $search=new Search(); $search->filterToStatus = 'all'; $search->orderBy = " link_votes "; $search->doSearch(); $new_search = $search->new_search(); require_once("libs/link_summary.php");
__________________ India Digg : News from users |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Method to add Sender Name and Sender Email to Tell-A-Friend feature | ablaye | Modification Tutorials | 0 | 11-18-2007 12:36 PM |
| Licensing | tbronson | Wiki Articles | 0 | 10-27-2007 11:55 PM |
| Problem with adbrite code | empollon | General Help | 2 | 07-03-2007 05:57 AM |
| new category code - improvements? | cruci | Modification Tutorials | 4 | 01-06-2007 01:35 PM |




Linear Mode

