aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm/admin_groups.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-07-04 17:19:00 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-07-04 17:19:00 +0000
commit055fe9e82dc15c84dbdad866e8a486397d32cfe9 (patch)
tree80ae44e1b48ee1fd7440655574ff1b2641e96078 /phpBB/adm/admin_groups.php
parentc220126bbd1bac33ca4bf1e13bf2d95a5b980124 (diff)
downloadforums-055fe9e82dc15c84dbdad866e8a486397d32cfe9.tar
forums-055fe9e82dc15c84dbdad866e8a486397d32cfe9.tar.gz
forums-055fe9e82dc15c84dbdad866e8a486397d32cfe9.tar.bz2
forums-055fe9e82dc15c84dbdad866e8a486397d32cfe9.tar.xz
forums-055fe9e82dc15c84dbdad866e8a486397d32cfe9.zip
sqlite support UNION ALL SELECT method
git-svn-id: file:///svn/phpbb/trunk@4203 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/adm/admin_groups.php')
-rw-r--r--phpBB/adm/admin_groups.php27
1 files changed, 11 insertions, 16 deletions
diff --git a/phpBB/adm/admin_groups.php b/phpBB/adm/admin_groups.php
index e0ebf48c30..5804f332d3 100644
--- a/phpBB/adm/admin_groups.php
+++ b/phpBB/adm/admin_groups.php
@@ -434,20 +434,6 @@ function swatch()
// Insert the new users
switch (SQL_LAYER)
{
- case 'postgresql':
- case 'msaccess':
- case 'mssql-odbc':
- case 'oracle':
- case 'db2':
- foreach ($user_id_ary as $user_id)
- {
- $sql = "INSERT INTO $table_sql (user_id, group_id)
- VALUES ($user_id, $group_id)";
- $db->sql_query($sql);
- }
-
- break;
-
case 'mysql':
case 'mysql4':
$sql = "INSERT INTO $table_sql (user_id, group_id)
@@ -456,10 +442,19 @@ function swatch()
break;
case 'mssql':
- $sql = "INSERT INTO $table_sql (user_id, group_id)
- VALUES " . implode(' UNION ALL ', preg_replace('#^([0-9]+)$#', "(\\1, $group_id)", $user_id_ary));
+ case 'sqlite':
+ $sql = "INSERT INTO $table_sql (user_id, group_id) " . implode(' UNION ALL ', preg_replace('#^([0-9]+)$#', "(\\1, $group_id)", $user_id_ary));
$db->sql_query($sql);
break;
+
+ default:
+ foreach ($user_id_ary as $user_id)
+ {
+ $sql = "INSERT INTO $table_sql (user_id, group_id)
+ VALUES ($user_id, $group_id)";
+ $db->sql_query($sql);
+ }
+ break;
}
// Update user settings (color, rank) if applicable