diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2005-10-02 18:15:12 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2005-10-02 18:15:12 +0000 |
commit | 58d146cac61a8c574346ee794a04bdfeaab9215d (patch) | |
tree | ce653b0234b03a5069812399b5365249d9a57865 /phpBB/includes/acm | |
parent | b6e154f49492684d90e7dbc5dc6f210abbca3d0f (diff) | |
download | forums-58d146cac61a8c574346ee794a04bdfeaab9215d.tar forums-58d146cac61a8c574346ee794a04bdfeaab9215d.tar.gz forums-58d146cac61a8c574346ee794a04bdfeaab9215d.tar.bz2 forums-58d146cac61a8c574346ee794a04bdfeaab9215d.tar.xz forums-58d146cac61a8c574346ee794a04bdfeaab9215d.zip |
- move some functions from global functions file to functions_display (those only needed in posting and viewtopic/forum)
git-svn-id: file:///svn/phpbb/trunk@5240 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acm')
-rw-r--r-- | phpBB/includes/acm/acm_main.php | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/phpBB/includes/acm/acm_main.php b/phpBB/includes/acm/acm_main.php index b174dab92b..bdb8189bd7 100644 --- a/phpBB/includes/acm/acm_main.php +++ b/phpBB/includes/acm/acm_main.php @@ -273,9 +273,24 @@ class cache extends acm } else { - $sql = 'SELECT user_id, bot_agent, bot_ip - FROM ' . BOTS_TABLE . ' - WHERE bot_active = 1'; + switch (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; + + // 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; + } $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) |