| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function insert(): string |
||
| 22 | { |
||
| 23 | $keys = array_keys($this->_valoresAInsertar->valoresAInsertar()); |
||
| 24 | $values = ''; |
||
| 25 | |||
| 26 | $x=1; |
||
| 27 | foreach($this->_valoresAInsertar->valoresAInsertar() as $field) |
||
| 28 | { |
||
| 29 | $values.= "?"; |
||
| 30 | |||
| 31 | if($x < count($this->_valoresAInsertar->valoresAInsertar())) |
||
| 32 | { |
||
| 33 | $values.= ', '; |
||
| 34 | } |
||
| 35 | |||
| 36 | $x++; |
||
| 37 | } |
||
| 38 | |||
| 39 | return "INSERT INTO ". $this->_tabla->tabla()." (`". implode('`, `', $keys) ."`) VALUES ({$values})"; |
||
| 40 | } |
||
| 41 | } |