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)) {