Topic: search results sort by joindate possible?
Hello,
I am using quicksearch buttons, such as :
<form name="quicksearch" method="post" action="index.php?m=search">
<input type="hidden" name="gender2" value="Man" />
<input type="hidden" name="pictures_only" value="1" />
<input class="showSubmit" type="submit" name="submit" value=" all men with photo"/>
<input type="hidden" name="issearch" value="1" />
</form>
And I am wondering how I could have the search results in desc order by joindate.
Purpose is to have the most recently joined member on top of the list.
In cp.search.php near line 235 (and after) I see things that possibly influence the sort order, however, I am not sure how to use these in the above quicksearch.
What I did is to mod near line 347
$result = $DB->query("SELECT m.member_id, m.username, m.screenname, m.joindate,
(m.totalactivepictures + m.totalinactivepictures) AS totalpictures,
(m.totalimessages + m.totalsmessages) as totalmessages,
m.picture
FROM " . DB_PREFIX . "members AS m, " . DB_PREFIX . "members_groups AS g
WHERE m.group_id=g.group_id AND $sqlquery
ORDER BY $sort $order
LIMIT " . (($page - 1) * $results) . ", " . $results);
And change $sort $order into joindate desc, to 'hardcode' the sort, but is has no effect. Just trying to change the sort filters for the quicksearch.
Free Martial Arts Dating www.dojodate.net/kimono/