1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-05 00:22:31 +02:00

Merge branch 'master' into specfilescanning

This commit is contained in:
Jeff Mitchell 2012-06-26 08:19:50 -04:00
commit c14984c647

View File

@ -328,9 +328,10 @@ DatabaseImpl::artistId( const QString& name_orig, bool autoCreate )
int id = 0;
QString sortname = DatabaseImpl::sortname( name_orig );
QString queryString = QString( "SELECT id FROM artist WHERE sortname = '%1'" ).arg( TomahawkSqlQuery::escape( sortname ) );
TomahawkSqlQuery query = newquery();
query.exec( queryString );
query.prepare( "SELECT id FROM artist WHERE sortname = ?" );
query.addBindValue( sortname );
query.exec();
if ( query.next() )
{
id = query.value( 0 ).toInt();