diff --git a/classes/iquery_builder.php b/classes/iquery_builder.php index cd5f2f8..2c32793 100644 --- a/classes/iquery_builder.php +++ b/classes/iquery_builder.php @@ -399,17 +399,6 @@ interface iQuery_Builder { // -------------------------------------------------------------------------- - /** - * Creates a batch insert clause, and executes it - * - * @param string $table - * @param mixed $data - * @return mixed - */ - public function insert_batch($table, $data=array()); - - // -------------------------------------------------------------------------- - /** * Creates an update clause, and executes it * diff --git a/classes/query_builder.php b/classes/query_builder.php index d397a8f..735d0da 100644 --- a/classes/query_builder.php +++ b/classes/query_builder.php @@ -1019,43 +1019,6 @@ class Query_Builder implements iQuery_Builder { // -------------------------------------------------------------------------- - /** - * Creates a batch insert clause and executes it - * - * @param string $table - * @param mixed $data - * @return mixed - */ - public function insert_batch($table, $data=array()) - { - // Bail out on Firebird and ODBC - $driver = str_replace('_sql', '', mb_strtolower(get_class($this->sql))); - - if ($driver == 'firebird' || $driver == 'odbc') - { - return NULL; - } - - // Can't use normal set, because it doesn't handle multidimensional arrays - foreach($data as $key => $arr) - { - $this->set_array_keys[$key] = array(); - - foreach($arr as $k => $v) - { - array_push($this->set_array_keys[$key], $k); - $this->values[] = $v; - } - - // Escape the field names - $this->set_array_keys[$key] = $this->db->quote_ident($this->set_array_keys[$key]); - } - - return $this->_run("insert_batch", $table); - } - - // -------------------------------------------------------------------------- - /** * Creates an update clause, and executes it * @@ -1324,25 +1287,6 @@ class Query_Builder implements iQuery_Builder { . implode(',', $this->set_array_keys) . ') VALUES ('.implode(',', $params).')'; break; - - case "insert_batch": - $param_count = count($this->set_array_keys[0]); - $params = array_fill(0, $param_count, '?'); - $sql = "INSERT INTO {$table} (" - . implode(',', $this->set_array_keys[0]) - . ') VALUES ( ' - . implode(',', $params) . ')'; - - // Remove the first set from the array - array_shift($this->set_array_keys); - - // Add another set of placeholders for each batch group - foreach($this->set_array_keys as $group) - { - $sql .= ',('.implode(',', $params).')'; - } - - break; case "update": $sql = "UPDATE {$table} SET {$this->set_string}"; diff --git a/docs/classes/BadConnectionException.html b/docs/classes/BadConnectionException.html index fc4f633..b7abc69 100644 --- a/docs/classes/BadConnectionException.html +++ b/docs/classes/BadConnectionException.html @@ -219,7 +219,7 @@
+ generated on 2013-05-02T12:51:15-04:00.