| | 9 | $meta = HermitDatabaseMetaFactory::get($pdo); |
| | 10 | $table = $annote->getTable(); |
| | 11 | $info = $meta->getTableInfo($table); |
| | 12 | $columns = $info->getColumns(); |
| | 13 | $insert = 'INSERT INTO'; |
| | 14 | $insert .= ' '; |
| | 15 | $insert .= $table; |
| | 16 | $insert .= ' ('; |
| | 17 | $insert .= join(', ', $columns); |
| | 18 | $insert .= ') VALUES ('; |
| | 19 | foreach($columns as $column){ |
| | 20 | $insert .= '/*' . $column . '*/'; |
| | 21 | $insert .= '"' . $column . '"'; |
| | 22 | $insert .= ','; |
| | 23 | } |
| | 24 | $insert = substr($insert, 0, -1); |
| | 25 | $insert .= ')'; |
| | 26 | $this->insert = $insert; |