[mythtv-commits] Ticket #76: mythgame makes two Calls to the
Database when only one will do the job.
MythTV
mythtv at cvs.mythtv.org
Fri Jul 8 01:53:13 EDT 2005
#76: mythgame makes two Calls to the Database when only one will do the job.
----------------------+-----------------------------------------------------
Id: 76 | Status: new
Component: mythgame | Modified: Fri Jul 8 05:53:12 2005
Severity: low | Milestone:
Priority: minor | Version: head
Owner: ijr | Reporter: Korey <k.m.fort at gmail.com>
----------------------+-----------------------------------------------------
By replacing these:
''query.exec("DELETE FROM settings WHERE value='GameDBSchemaVer';");
query.exec(QString("INSERT INTO settings (value, data, hostname) "
"VALUES ('GameDBSchemaVer', %1, NULL);").arg(newnumber));
''
with a sigle update.
''query.exec(QString("UPDATE settings SET value='GameDBSchemaVer',
data=%1, hostname=NULL WHERE value='GameDBSchemaVer';").arg(newnumber));
''
One call to the database can be avoided. If the settings table does not
have value=GameDBSchemaVer it will be created.
--
Ticket URL: <http://cvs.mythtv.org/trac/ticket/76>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list