mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 22:38:52 +00:00
- Bug #4000
git-svn-id: file:///svn/phpbb/trunk@6332 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
bd4391d4ca
commit
bb3034eb26
1 changed files with 18 additions and 4 deletions
|
@ -956,10 +956,24 @@ $template->assign_vars(array(
|
||||||
'S_SELECT_SORT_DAYS' => $s_limit_days)
|
'S_SELECT_SORT_DAYS' => $s_limit_days)
|
||||||
);
|
);
|
||||||
|
|
||||||
$sql = 'SELECT search_time, search_keywords
|
// Can't do comparisons w/ TEXT on MSSQL, CAST is good enough
|
||||||
FROM ' . SEARCH_RESULTS_TABLE . '
|
switch (SQL_LAYER)
|
||||||
WHERE search_keywords <> \'\'
|
{
|
||||||
ORDER BY search_time DESC';
|
case 'mssql':
|
||||||
|
case 'mssql_odbc':
|
||||||
|
$sql = 'SELECT search_time, search_keywords
|
||||||
|
FROM ' . SEARCH_RESULTS_TABLE . '
|
||||||
|
WHERE CAST(search_keywords AS varchar) <> \'\'
|
||||||
|
ORDER BY search_time DESC';
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$sql = 'SELECT search_time, search_keywords
|
||||||
|
FROM ' . SEARCH_RESULTS_TABLE . '
|
||||||
|
WHERE search_keywords <> \'\'
|
||||||
|
ORDER BY search_time DESC';
|
||||||
|
break;
|
||||||
|
}
|
||||||
$result = $db->sql_query_limit($sql, 5);
|
$result = $db->sql_query_limit($sql, 5);
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
|
Loading…
Add table
Reference in a new issue