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 d9b050c24d618cc06218492f05bc3bdb9699a87c..246b4ea21bc391c982be978d190eb8124f175628 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 9f0f1e2523faf5a6edbd3e154378cdd7f8c6040e..810f7164f2d7d52d4a040722bed02bb5f903ba77 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 ");