- Timestamp:
- 04/12/10 14:38:00 (13 years ago)
- Branches:
- master, qt5
- Children:
- cdc7679
- Parents:
- 77e06ae
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sql/sqlengine.cpp
r77e06ae rc129da26 162 162 QSqlQuery check_event_query; 163 163 check_event_query.prepare("SELECT * FROM EVENT WHERE xid_conference = :xid_conference AND id = :id"); 164 check_event_query.bindValue(":xid_conference", aEvent[" xid_conference"]);164 check_event_query.bindValue(":xid_conference", aEvent["conference_id"]); 165 165 check_event_query.bindValue(":id", aEvent["id"]); 166 if (check_event_query.isActive() and check_event_query.isSelect() and check_event_query.first()) { 166 if (!check_event_query.exec()) { 167 qWarning() << "check event failed, conference id:" << aEvent["xid_conference"] 168 << "event id:" << aEvent["id"] 169 << "error:" << check_event_query.lastError() 170 ; 171 return; 172 } 173 if (check_event_query.isActive() and check_event_query.isSelect() and check_event_query.next()) { 167 174 event_exists = true; 168 175 } … … 187 194 " (xid_conference, id, start, duration, xid_track, type, " 188 195 " language, tag, title, subtitle, abstract, description) " 189 " VALUES (:xid_conference, :id, :start, :duration, :xid_track "196 " VALUES (:xid_conference, :id, :start, :duration, :xid_track, :type, " 190 197 ":language, :tag, :title, :subtitle, :abstract, :description)"); 191 198 } … … 199 206 result.bindValue(QString(":") + prop_name, aEvent[prop_name]); 200 207 } 201 result.exec(); 208 if (!result.exec()) { 209 qWarning() << "event insert/update failed:" << result.lastError(); 210 } 202 211 } 203 212 }
Note: See TracChangeset
for help on using the changeset viewer.