16 parent::__construct ( $className );
17 if (($key = \array_search ( $this->pkName, $this->fields )) !==
false) {
18 unset ( $this->fields [$key] );
20 $this->insertFields = \implode (
',', $this->
getQuotedKeys ( $this->fields, $this->db->quote ) );
30 $quote = $this->db->quote;
31 $fieldCount = \count ( $this->fields );
34 $modelFields =
'(' . \implode (
',', \array_fill ( 0, $fieldCount,
'?' ) ) .
')';
35 foreach ( $this->instances as $instance ) {
37 $values [] = $modelFields;
40 return "INSERT INTO {$quote}{$this->tableName}{$quote} (" . $this->insertFields .
') VALUES ' . \implode (
',', $values );