Fix SQL Query

This commit is contained in:
Olivier Goffart 2013-10-03 23:00:47 +02:00
parent afc13e70b9
commit d8d2d36638

View File

@ -168,8 +168,8 @@ bool SyncJournalDb::deleteFileRecord(const QString& filename)
if( checkConnect() ) {
QSqlQuery query( "DELETE FROM metadata WHERE phash=:phash" );
query.bindValue( ":phash", QVariant::fromValue(phash) );
QSqlQuery query( "DELETE FROM metadata WHERE phash=?" );
query.bindValue( 0, QString::number(phash) );
if( !query.exec() ) {
qWarning() << "Exec error of SQL statement: " << query.lastQuery() << " : " << query.lastError().text();