aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/search.php
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2008-01-04 18:35:49 +0000
committerDavid M <davidmj@users.sourceforge.net>2008-01-04 18:35:49 +0000
commitaf738dbc2a48713f59779410955282aa5760b741 (patch)
tree35053fbc840e81689dada401b978ae8dfb181d33 /phpBB/search.php
parentedd6c34eda14fbef5bd1e6502735c45d038d6575 (diff)
downloadforums-af738dbc2a48713f59779410955282aa5760b741.tar
forums-af738dbc2a48713f59779410955282aa5760b741.tar.gz
forums-af738dbc2a48713f59779410955282aa5760b741.tar.bz2
forums-af738dbc2a48713f59779410955282aa5760b741.tar.xz
forums-af738dbc2a48713f59779410955282aa5760b741.zip
Ch-ch-ch-changes
- Made us more DB independent by making many queries capability based instead of DB specific - Finished PHP5ifying of the acm_file class, now with some (hopefully) enhancements to its performance - Sped up viewforum considerably (also goes towards mcp_forum) I really hope I didn't explode CVS... git-svn-id: file:///svn/phpbb/trunk@8301 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php29
1 files changed, 4 insertions, 25 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index 9176356595..c67581490b 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -1047,31 +1047,10 @@ $template->assign_vars(array(
// only show recent searches to search administrators
if ($auth->acl_get('a_search'))
{
- // Handle large objects differently for Oracle and MSSQL
- switch ($db->sql_layer)
- {
- case 'oracle':
- $sql = 'SELECT search_time, search_keywords
- FROM ' . SEARCH_RESULTS_TABLE . '
- WHERE dbms_lob.getlength(search_keywords) > 0
- ORDER BY search_time DESC';
- break;
-
- case 'mssql':
- case 'mssql_odbc':
- $sql = 'SELECT search_time, search_keywords
- FROM ' . SEARCH_RESULTS_TABLE . '
- WHERE DATALENGTH(search_keywords) > 0
- 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;
- }
+ $sql = 'SELECT search_time, search_keywords
+ FROM ' . SEARCH_RESULTS_TABLE . '
+ WHERE ' . $db->sql_function('length_text', 'search_keywords') . ' > 0
+ ORDER BY search_time DESC';
$result = $db->sql_query_limit($sql, 5);
while ($row = $db->sql_fetchrow($result))