| @@ 115-121 (lines=7) @@ | ||
| 112 | $ret = 'INSERT ' . $this->options |
|
| 113 | . ' INTO ' . $this->into; |
|
| 114 | ||
| 115 | if ($this->values != null && count($this->values) > 0) { |
|
| 116 | $ret .= ' VALUES ' . Array2d::build($this->values); |
|
| 117 | } elseif ($this->set != null && count($this->set) > 0) { |
|
| 118 | $ret .= ' SET ' . SetOperation::build($this->set); |
|
| 119 | } elseif ($this->select != null && strlen($this->select) > 0) { |
|
| 120 | $ret .= ' ' . $this->select->build(); |
|
| 121 | } |
|
| 122 | ||
| 123 | if ($this->onDuplicateSet != null && count($this->onDuplicateSet) > 0) { |
|
| 124 | $ret .= ' ON DUPLICATE KEY UPDATE ' . SetOperation::build($this->onDuplicateSet); |
|
| @@ 93-99 (lines=7) @@ | ||
| 90 | $ret = 'REPLACE ' . $this->options |
|
| 91 | . ' INTO ' . $this->into; |
|
| 92 | ||
| 93 | if ($this->values != null && count($this->values) > 0) { |
|
| 94 | $ret .= ' VALUES ' . Array2d::build($this->values); |
|
| 95 | } elseif ($this->set != null && count($this->set) > 0) { |
|
| 96 | $ret .= ' SET ' . SetOperation::build($this->set); |
|
| 97 | } elseif ($this->select != null && strlen($this->select) > 0) { |
|
| 98 | $ret .= ' ' . $this->select->build(); |
|
| 99 | } |
|
| 100 | ||
| 101 | return $ret; |
|
| 102 | } |
|