diff options
| author | David M <davidmj@users.sourceforge.net> | 2008-01-04 18:35:49 +0000 |
|---|---|---|
| committer | David M <davidmj@users.sourceforge.net> | 2008-01-04 18:35:49 +0000 |
| commit | af738dbc2a48713f59779410955282aa5760b741 (patch) | |
| tree | 35053fbc840e81689dada401b978ae8dfb181d33 /phpBB/includes/cache.php | |
| parent | edd6c34eda14fbef5bd1e6502735c45d038d6575 (diff) | |
| download | forums-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/includes/cache.php')
| -rw-r--r-- | phpBB/includes/cache.php | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/phpBB/includes/cache.php b/phpBB/includes/cache.php index 52e0007b28..c5445e7a56 100644 --- a/phpBB/includes/cache.php +++ b/phpBB/includes/cache.php @@ -295,31 +295,10 @@ class cache { global $db; - switch ($db->sql_layer) - { - case 'mssql': - case 'mssql_odbc': - $sql = 'SELECT user_id, bot_agent, bot_ip - FROM ' . BOTS_TABLE . ' - WHERE bot_active = 1 - ORDER BY LEN(bot_agent) DESC'; - break; - - case 'firebird': - $sql = 'SELECT user_id, bot_agent, bot_ip - FROM ' . BOTS_TABLE . ' - WHERE bot_active = 1 - ORDER BY CHAR_LENGTH(bot_agent) DESC'; - break; - - // LENGTH supported by MySQL, IBM DB2 and Oracle for sure... - default: - $sql = 'SELECT user_id, bot_agent, bot_ip - FROM ' . BOTS_TABLE . ' - WHERE bot_active = 1 - ORDER BY LENGTH(bot_agent) DESC'; - break; - } + $sql = 'SELECT user_id, bot_agent, bot_ip + FROM ' . BOTS_TABLE . ' + WHERE bot_active = 1 + ORDER BY ' . $db->sql_function('length_varchar', 'bot_agent') . 'DESC'; $result = $db->sql_query($sql); $bots = array(); |
