1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-26 21:15:21 +02:00

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
This commit is contained in:
Meik Sievertsen
2009-08-01 16:08:05 +00:00
parent 44a15b8635
commit b7a0ef7e7a

View File

@ -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;
}
}
}