Changeset 51529bd for src/mvc/track.cpp


Ignore:
Timestamp:
06/22/11 19:51:30 (11 years ago)
Author:
gregor herrmann <gregoa@…>
Branches:
master, qt5
Children:
f657e9c
Parents:
cfe9990
Message:

Insert new field xid_conference into table track, room and person.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/track.cpp

    rcfe9990 r51529bd  
    2121
    2222QString const Track::sTableName = QString("track");
    23 int const Track::sTableColCount = 2;
     23int const Track::sTableColCount = 3;
     24const QString Track::CONFERENCEID = "xid_conference";
    2425const QString Track::NAME = "name";
    2526
    2627QSqlRecord const Track::sColumns = Track::toRecord(QList<QSqlField>()
    2728    << QSqlField("id", QVariant::Int)
     29    << QSqlField(CONFERENCEID, QVariant::Int)
    2830    << QSqlField(NAME, QVariant::String));
    2931
     
    3739{
    3840    QSqlQuery query;
    39     query.prepare("INSERT INTO " + sTableName + " (" + NAME + ")" + " VALUES " + "(\"" + name() + "\")");
     41    query.prepare("INSERT INTO " + sTableName + " (" + CONFERENCEID + "," + NAME + ")" + " VALUES " + "(\"" + QString::number(conferenceid()) + "\",\"" + name() + "\")");
    4042    if (!query.exec())
    4143    {
Note: See TracChangeset for help on using the changeset viewer.