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:
the_undefined 2008-04-22 16:59:26 +00:00
parent 42083e0a1b
commit 5321ce98ec

View file

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