diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2009-08-01 16:08:05 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-08-01 16:08:05 +0000 |
commit | b7a0ef7e7a5f758cfaf874c84f8fc32c098946ab (patch) | |
tree | e9c81cd827111fffe4620a40cb71c97e20b302b6 | |
parent | 44a15b86355e0d2a4d7f6623cd05a3c9e5e58bdd (diff) | |
download | forums-b7a0ef7e7a5f758cfaf874c84f8fc32c098946ab.tar forums-b7a0ef7e7a5f758cfaf874c84f8fc32c098946ab.tar.gz forums-b7a0ef7e7a5f758cfaf874c84f8fc32c098946ab.tar.bz2 forums-b7a0ef7e7a5f758cfaf874c84f8fc32c098946ab.tar.xz forums-b7a0ef7e7a5f758cfaf874c84f8fc32c098946ab.zip |
return errors if return_on_error is true for multi_insert (Patch by bantu)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9909 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/includes/db/dbal.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php index b530a572da..95cfc01b14 100644 --- a/phpBB/includes/db/dbal.php +++ b/phpBB/includes/db/dbal.php @@ -447,7 +447,7 @@ class dbal $ary[] = '(' . implode(', ', $values) . ')'; } - $this->sql_query('INSERT INTO ' . $table . ' ' . ' (' . implode(', ', array_keys($sql_ary[0])) . ') VALUES ' . implode(', ', $ary)); + return $this->sql_query('INSERT INTO ' . $table . ' ' . ' (' . implode(', ', array_keys($sql_ary[0])) . ') VALUES ' . implode(', ', $ary)); } else { @@ -458,7 +458,12 @@ class dbal return false; } - $this->sql_query('INSERT INTO ' . $table . ' ' . $this->sql_build_array('INSERT', $ary)); + $result = $this->sql_query('INSERT INTO ' . $table . ' ' . $this->sql_build_array('INSERT', $ary)); + + if (!$result) + { + return false; + } } } |