Changeset 69393c0 for src/sql/sqlengine.cpp
- Timestamp:
- 01/13/10 14:27:33 (13 years ago)
- Branches:
- master, qt5
- Children:
- 969a840
- Parents:
- c2d66b2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sql/sqlengine.cpp
rc2d66b2 r69393c0 68 68 .arg(aConference["venue"]) \ 69 69 .arg(aConference["city"]) \ 70 .arg( aConference["start"]) \71 .arg( aConference["end"]) \70 .arg(QDateTime(QDate::fromString(aConference["start"],DATE_FORMAT)).toTime_t()) \ 71 .arg(QDateTime(QDate::fromString(aConference["end"],DATE_FORMAT)).toTime_t()) \ 72 72 .arg(aConference["days"]) \ 73 .arg( aConference["day_change"]) \74 .arg( aConference["timeslot_duration"]);73 .arg(-QTime::fromString(aConference["day_change"],TIME_FORMAT).secsTo(QTime(0,0))) \ 74 .arg(-QTime::fromString(aConference["timeslot_duration"],TIME_FORMAT).secsTo(QTime(0,0))); 75 75 76 76 QString query = QString("INSERT INTO CONFERENCE (id,title,subtitle,venue,city,start,end,days,day_change,timeslot_duration) VALUES (%1)").arg(values); … … 90 90 // The items of the Event are divided into the two tables EVENT and VIRTUAL_EVENT 91 91 // VIRTUAL_EVENT is for Full-Text-Serach Support 92 QTime duration = QTime::fromString(aEvent["duration"],TIME_FORMAT);93 92 QDateTime startDateTime = QDateTime(QDate::fromString(aEvent["date"],DATE_FORMAT),QTime::fromString(aEvent["start"],TIME_FORMAT)); 94 93 QString values = QString("'%1', '%2', '%3', '%4', '%5', '%6', '%7'") \ … … 96 95 .arg(aEvent["id"]) \ 97 96 .arg(QString::number(startDateTime.toTime_t())) \ 98 .arg( QString::number(duration.hour()*3600 + duration.minute()*60 + duration.second())) \97 .arg(-QTime::fromString(aEvent["duration"],TIME_FORMAT).secsTo(QTime(0,0))) \ 99 98 .arg("123456") \ 100 99 .arg(aEvent["type"]) \ … … 201 200 venue VARCHAR, \ 202 201 city VARCHAR NOT NULL , \ 203 start DATETIMENOT NULL , \204 end DATETIMENOT NULL , \202 start INTEGER NOT NULL , \ 203 end INTEGER NOT NULL , \ 205 204 days INTEGER, \ 206 day_change DATETIME, \207 timeslot_duration DATETIME)");205 day_change INTEGER, \ 206 timeslot_duration INTEGER)"); 208 207 209 208 query.exec("CREATE TABLE ACTIVITY ( \
Note: See TracChangeset
for help on using the changeset viewer.