Changeset 0bb39f5 for src/sql/sqlengine.cpp
- Timestamp:
- 01/27/10 16:31:10 (13 years ago)
- Branches:
- master, qt5
- Children:
- a790a90
- Parents:
- 07ae23a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sql/sqlengine.cpp
r07ae23a r0bb39f5 7 7 8 8 #include <QDir> 9 #include <appsettings.h>10 9 #include "sqlengine.h" 11 10 #include <track.h> … … 95 94 .arg(-QTime::fromString(aConference["day_change"],TIME_FORMAT).secsTo(QTime(0,0))) \ 96 95 .arg(-QTime::fromString(aConference["timeslot_duration"],TIME_FORMAT).secsTo(QTime(0,0))); 97 98 QString query = QString("INSERT INTO CONFERENCE (title,subtitle,venue,city,start,end,days,day_change,timeslot_duration) VALUES (%1)").arg(values); 96 values.append(QString(", '%1'").arg(confsList.count()>0?"0":"1")); 97 98 QString query = QString("INSERT INTO CONFERENCE (title,subtitle,venue,city,start,end,days,day_change,timeslot_duration,active) VALUES (%1)").arg(values); 99 99 QSqlQuery result (query, db); 100 100 aConference["id"] = result.lastInsertId().toString(); // 'id' is assigned automatically 101 102 if(!AppSettings::confId()) // default conf Id isn't set yet => set it up103 AppSettings::setConfId(confId);104 101 } 105 102 } … … 241 238 "days INTEGER, " 242 239 "day_change INTEGER, " 243 "timeslot_duration INTEGER);"); 240 "timeslot_duration INTEGER, " 241 "active INTEGER DEFAULT 0);"); 244 242 245 243 query.exec("CREATE TABLE TRACK ( "
Note: See TracChangeset
for help on using the changeset viewer.