mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00: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:
parent
44a15b8635
commit
b7a0ef7e7a
1 changed files with 7 additions and 2 deletions
|
@ -447,7 +447,7 @@ class dbal
|
||||||
$ary[] = '(' . implode(', ', $values) . ')';
|
$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
|
else
|
||||||
{
|
{
|
||||||
|
@ -458,7 +458,12 @@ class dbal
|
||||||
return false;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue