mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
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
This commit is contained in:
@@ -1251,28 +1251,10 @@ class parse_message extends bbcode_firstpass
|
||||
// NOTE: obtain_* function? chaching the table contents?
|
||||
|
||||
// For now setting the ttl to 10 minutes
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
$sql = 'SELECT *
|
||||
FROM ' . SMILIES_TABLE . '
|
||||
ORDER BY LEN(code) DESC';
|
||||
break;
|
||||
|
||||
case 'firebird':
|
||||
$sql = 'SELECT *
|
||||
FROM ' . SMILIES_TABLE . '
|
||||
ORDER BY CHAR_LENGTH(code) DESC';
|
||||
break;
|
||||
$sql = 'SELECT *
|
||||
FROM ' . SMILIES_TABLE . '
|
||||
ORDER BY ' . $db->sql_function('length_varchar', 'code') . ' DESC';
|
||||
|
||||
// LENGTH supported by MySQL, IBM DB2, Oracle and Access for sure...
|
||||
default:
|
||||
$sql = 'SELECT *
|
||||
FROM ' . SMILIES_TABLE . '
|
||||
ORDER BY LENGTH(code) DESC';
|
||||
break;
|
||||
}
|
||||
$result = $db->sql_query($sql, 600);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
|
Reference in New Issue
Block a user