From c26613256a272fd74842a8413d1c6212d7a4f406 Mon Sep 17 00:00:00 2001 From: "Janus B. Kristensen" Date: Thu, 30 Jun 2005 09:48:09 +0000 Subject: [PATCH] Sort results with newest posts first svn path=/trunk/boinc/; revision=6501 --- html/user/forum_text_search_action.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/html/user/forum_text_search_action.php b/html/user/forum_text_search_action.php index 0fef9f0793..d0c9cc023e 100644 --- a/html/user/forum_text_search_action.php +++ b/html/user/forum_text_search_action.php @@ -14,7 +14,7 @@ $what = ''; if ($_GET['titles']) { $what = 'titles=1'; page_head("Titles containing '$search_string'"); - $q = "select * from thread where match(title) against ('$search_string') limit $offset,$count"; + $q = "select * from thread where match(title) against ('$search_string') order by create_time desc limit $offset,$count"; $result = mysql_query($q); echo ""; $n = 0; @@ -37,8 +37,9 @@ if ($_GET['bodies']) { $what .= 'bodies=1'; page_head("Messages containing '$search_string'"); - $q = "select * from post where match(content) against ('$search_string') limit $offset,$count"; + $q = "select * from post where match(content) against ('$search_string') order by timestamp desc limit $offset,$count"; $result = mysql_query($q); + echo mysql_error(); echo "
"; $n = 0; while ($post = mysql_fetch_object($result)) {