Changeset 680a4da for src/sql


Ignore:
Timestamp:
01/16/10 16:31:15 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
c790268
Parents:
8860ff4
Message:

work on favourite

  • created 'favourite' column in EVENT table
  • modified 'ormrecord' for setting record's elements
  • favourities view not implemented
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sql/sqlengine.cpp

    r8860ff4 r680a4da  
    9191        // VIRTUAL_EVENT is for Full-Text-Serach Support
    9292        QDateTime startDateTime = QDateTime(QDate::fromString(aEvent["date"],DATE_FORMAT),QTime::fromString(aEvent["start"],TIME_FORMAT));
    93         QString values = QString("'%1', '%2', '%3', '%4', '%5', '%6', '%7'") \
     93        QString values = QString("'%1', '%2', '%3', '%4', '%5', '%6', '%7', '%8'") \
    9494                         .arg(aEvent["conference_id"]) \
    9595                         .arg(aEvent["id"]) \
     
    9898                         .arg("123456") \
    9999                         .arg(aEvent["type"]) \
    100                          .arg(aEvent["language"]);
    101 
    102         QString query = QString("INSERT INTO EVENT (xid_conference, id, start, duration, xid_activity, type, language) VALUES (%1)").arg(values);
     100                         .arg(aEvent["language"]) \
     101                         .arg("0"); // not favourite when added
     102
     103        QString query = QString("INSERT INTO EVENT (xid_conference, id, start, duration, xid_activity, type, language, favourite) VALUES (%1)").arg(values);
    103104        QSqlQuery result (query, db);
    104105        //LOG_AUTOTEST(query);
     
    227228            type VARCHAR, \
    228229            language VARCHAR, \
     230            favourite INTEGER DEFAULT 0, \
    229231            PRIMARY KEY (xid_conference,id), \
    230232            FOREIGN KEY(xid_conference) REFERENCES CONFERENCE(id) \
Note: See TracChangeset for help on using the changeset viewer.