mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Giving bool return value to DboSource::insertMulti
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6708 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
42083e0a1b
commit
5321ce98ec
1 changed files with 2 additions and 1 deletions
|
@ -1968,6 +1968,7 @@ class DboSource extends DataSource {
|
|||
* @param string $table
|
||||
* @param string $fields
|
||||
* @param array $values
|
||||
* @return bool True on success, false on failure
|
||||
*/
|
||||
function insertMulti($table, $fields, $values) {
|
||||
$table = $this->fullTableName($table);
|
||||
|
@ -1975,7 +1976,7 @@ class DboSource extends DataSource {
|
|||
$fields = join(', ', array_map(array(&$this, 'name'), $fields));
|
||||
}
|
||||
$values = implode(', ', $values);
|
||||
$this->query("INSERT INTO {$table} ({$fields}) VALUES {$values}");
|
||||
return $this->execute("INSERT INTO {$table} ({$fields}) VALUES {$values}");
|
||||
}
|
||||
/**
|
||||
* Inserts multiple values into a join table
|
||||
|
|
Loading…
Add table
Reference in a new issue