The '%' character doesn't have to be escaped anymore.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 26 Jun 2011 18:26:09 +0000 (18:26 +0000)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 26 Jun 2011 18:26:09 +0000 (18:26 +0000)
src/gui/searchtabcontainer.cpp
src/sql/sqlengine.cpp

index d9b050c..246b4ea 100644 (file)
@@ -83,8 +83,7 @@ void SearchTabContainer::searchButtonClicked()
     if( searchHeader->searchRoom->isChecked() )
         columns["ROOM"] = "name";
 
-    QString keyword = searchHeader->searchEdit->text().replace( QString("%"), QString("\\%") );
-    //qDebug() << "\nKeyword to search: " << keyword;
+    QString keyword = searchHeader->searchEdit->text();
 
     int confId = Conference::activeConference();
     SqlEngine::searchEvent( confId, columns, keyword );
index 9f0f1e2..810f716 100644 (file)
@@ -309,7 +309,7 @@ int SqlEngine::searchEvent(int aConferenceId, const QHash<QString,QString> &aCol
     // DROP
     execQuery( db, "DROP TABLE IF EXISTS SEARCH_EVENT");
     // CREATE
-    execQuery( db, "CREATE TEMP TABLE SEARCH_EVENT ( xid_conference INTEGER  NOT NULL, id INTEGER NOT NULL )");
+    execQuery( db, "CREATE TABLE SEARCH_EVENT ( xid_conference INTEGER  NOT NULL, id INTEGER NOT NULL )");
     // INSERT
     QString sql = QString("INSERT INTO SEARCH_EVENT ( xid_conference, id ) "
                 "SELECT EVENT.xid_conference, EVENT.id FROM EVENT ");