|
@@ -13,7 +13,7 @@
|
13
|
13
|
var filename = QFileDialog.getOpenFileName(win, 'Open Log…', QSettings.value('script/lastDir', '') + '/');
|
14
|
14
|
if(filename != '') {
|
15
|
15
|
QSettings.setValue("script/lastDir", dir(filename));
|
16
|
|
- var q = "INSERT INTO files VALUES(default, :name, 'profile', NULL, :data) RETURNING id";
|
|
16
|
+ var q = "INSERT INTO files (id, name, type, note, file) VALUES(default, :name, 'profile', NULL, :data) RETURNING id";
|
17
|
17
|
query = new QSqlQuery();
|
18
|
18
|
query.prepare(q);
|
19
|
19
|
query.bind(":name", baseName(filename));
|
|
@@ -22,7 +22,7 @@
|
22
|
22
|
query.next();
|
23
|
23
|
var fileno = query.value(0);
|
24
|
24
|
var id = box.currentData();
|
25
|
|
- q = "INSERT INTO item_files VALUES('now', ";
|
|
25
|
+ q = "INSERT INTO item_files (time, item, files) VALUES('now', ";
|
26
|
26
|
q = q + id;
|
27
|
27
|
q = q + ", '{";
|
28
|
28
|
q = q + fileno;
|