diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-07-04 17:19:00 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-07-04 17:19:00 +0000 |
commit | 055fe9e82dc15c84dbdad866e8a486397d32cfe9 (patch) | |
tree | 80ae44e1b48ee1fd7440655574ff1b2641e96078 /phpBB/adm/admin_search.php | |
parent | c220126bbd1bac33ca4bf1e13bf2d95a5b980124 (diff) | |
download | forums-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_search.php')
-rw-r--r-- | phpBB/adm/admin_search.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/phpBB/adm/admin_search.php b/phpBB/adm/admin_search.php index 69b427caa3..32cabc8dcd 100644 --- a/phpBB/adm/admin_search.php +++ b/phpBB/adm/admin_search.php @@ -201,13 +201,16 @@ if (isset($_POST['start']) || isset($_GET['batchstart'])) { case 'mysql': case 'mysql4': - $value_sql .= (($value_sql != '') ? ', ' : '') . '(\'' . $word[$i] . '\')'; + $value_sql .= (($value_sql != '') ? ', ' : '') . "('" . $word[$i] . "')"; break; + case 'mssql': + case 'sqlite': $value_sql .= (($value_sql != '') ? ' UNION ALL ' : '') . "SELECT '" . $word[$i] . "'"; break; + default: - $sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text) + $sql = 'INSERT INTO ' . SEARCH_WORD_TABLE . " (word_text) VALUES ('" . $word[$i] . "')"; $db->sql_query($sql); break; @@ -221,11 +224,13 @@ if (isset($_POST['start']) || isset($_GET['batchstart'])) { case 'mysql': case 'mysql4': - $sql = "INSERT IGNORE INTO " . SEARCH_WORD_TABLE . " (word_text) + $sql = 'INSERT IGNORE INTO ' . SEARCH_WORD_TABLE . " (word_text) VALUES $value_sql"; break; + case 'mssql': - $sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text) + case 'sqlite': + $sql = 'INSERT INTO ' . SEARCH_WORD_TABLE . " (word_text) $value_sql"; break; } @@ -240,7 +245,7 @@ if (isset($_POST['start']) || isset($_GET['batchstart'])) if ($match_sql != '') { - $sql = "INSERT INTO " . SEARCH_MATCH_TABLE . " (post_id, word_id, title_match) + $sql = 'INSERT INTO ' . SEARCH_MATCH_TABLE . " (post_id, word_id, title_match) SELECT $post_id, word_id, $title_match FROM " . SEARCH_WORD_TABLE . " WHERE word_text IN ($match_sql)"; |