Conditions | 4 |
Paths | 6 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public function build() |
||
43 | { |
||
44 | // reset the parameterized values |
||
45 | $this->values = []; |
||
46 | |||
47 | $fields = []; |
||
48 | foreach ($this->setValues as $key => $value) { |
||
49 | if ($id = $this->escapeIdentifier($key)) { |
||
50 | $fields[] = $id.' = ?'; |
||
51 | $this->values[] = $value; |
||
52 | } |
||
53 | } |
||
54 | |||
55 | if (count($fields) == 0) { |
||
56 | return ''; |
||
57 | } |
||
58 | |||
59 | // produces "SET `col1`=?,`col2`=?,`col3`=?" |
||
60 | return 'SET '.implode(', ', $fields); |
||
61 | } |
||
62 | } |
||
63 |