private function build_insert() { require_once 'Expressions.php'; $keys = join(',', $this->quoted_key_names()); $e = new Expressions($this->connection, "INSERT INTO {$this->table}({$keys}) VALUES(?)", array_values($this->data)); return $e->to_s(); }
private function build_insert() { require_once 'Expressions.php'; $keys = join(',', $this->quoted_key_names()); if ($this->sequence) { $sql = "INSERT INTO {$this->table}({$keys}," . $this->connection->quote_name($this->sequence[0]) . ") VALUES(?," . $this->connection->next_sequence_value($this->sequence[1]) . ")"; } else { $sql = "INSERT INTO {$this->table}({$keys}) VALUES(?)"; } $e = new Expressions($this->connection, $sql, array_values($this->data)); return $e->to_s(); }
private function build_insert() { $keys = join(',', array_keys($this->data)); $e = new Expressions("INSERT INTO {$this->table}({$keys}) VALUES(?)", array_values($this->data)); $e->set_connection($this->connection); return $e->to_s(); }