From 4afaca12dc55b076293e9ef8ac28332d22730df0 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 14 Oct 2006 14:56:46 +0000 Subject: - store sql_layer directly within the layer itself - new method sql_multi_insert to circumvent db-specific hacks (hopefully not introduced any parsing errors) git-svn-id: file:///svn/phpbb/trunk@6497 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_posting.php | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 6e6cc1020e..2bdc109b96 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1708,24 +1708,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u } } - if (sizeof($sql_insert_ary)) - { - switch (SQL_LAYER) - { - case 'mysql': - case 'mysql4': - case 'mysqli': - $db->sql_query('INSERT INTO ' . POLL_OPTIONS_TABLE . ' ' . $db->sql_build_array('MULTI_INSERT', $sql_insert_ary)); - break; - - default: - foreach ($sql_insert_ary as $ary) - { - $db->sql_query('INSERT INTO ' . POLL_OPTIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $ary)); - } - break; - } - } + $db->sql_multi_insert(POLL_OPTIONS_TABLE, $sql_insert_ary); if (sizeof($poll['poll_options']) < sizeof($cur_poll_options)) { -- cgit v1.2.1