Fixes Ticket #2999, HABTM save multiple for PostgreSQL

Merged changes from 1.2 DboOdbc into 1.1

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5603 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-08-29 05:07:16 +00:00
parent 51418a07da
commit 0ed8c17f80

View file

@ -578,6 +578,18 @@ class DboPostgres extends DboSource {
function getEncoding() {
return pg_client_encoding($this->connection);
}
/**
* Inserts multiple values into a join table
*
* @param string $table
* @param string $fields
* @param array $values
*/
function insertMulti($table, $fields, $values) {
$count = count($values);
for ($x = 0; $x < $count; $x++) {
$this->query("INSERT INTO {$table} ({$fields}) VALUES {$values[$x]}");
}
}
}
?>