mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Update inserted folders with the added date
This commit is contained in:
parent
9c9b62db70
commit
11df4a9b42
@ -1232,13 +1232,16 @@ void DBHelper::updateComicsInfo(QList<ComicDB> &comics, const QString &databaseP
|
||||
// inserts
|
||||
qulonglong DBHelper::insert(Folder *folder, QSqlDatabase &db)
|
||||
{
|
||||
auto added = QDateTime::currentSecsSinceEpoch();
|
||||
folder->added = added;
|
||||
|
||||
QSqlQuery query(db);
|
||||
query.prepare("INSERT INTO folder (parentId, name, path, added) "
|
||||
"VALUES (:parentId, :name, :path, :added)");
|
||||
query.bindValue(":parentId", folder->parentId);
|
||||
query.bindValue(":name", folder->name);
|
||||
query.bindValue(":path", folder->path);
|
||||
query.bindValue(":added", QDateTime::currentSecsSinceEpoch());
|
||||
query.bindValue(":added", added);
|
||||
query.exec();
|
||||
|
||||
return query.lastInsertId().toULongLong();
|
||||
|
Loading…
Reference in New Issue
Block a user