static void replace_in_db(QStringList &value_clauses, uint chanid, uint eventid, uint64_t sig) { value_clauses << QString("(%1,%2,%3,%4,%5)") .arg(chanid).arg(eventid).arg(extract_table_id(sig)) .arg(extract_version(sig)).arg(extract_endtime(sig)); }
static void replace_in_db(int chanid, uint eventid, uint64_t sig) { MSqlQuery query(MSqlQuery::InitCon()); QString qstr = "REPLACE INTO eit_cache " " ( chanid, eventid, tableid, version, endtime) " "VALUES (:CHANID, :EVENTID, :TABLEID, :VERSION, :ENDTIME)"; query.prepare(qstr); query.bindValue(":CHANID", chanid); query.bindValue(":EVENTID", eventid); query.bindValue(":TABLEID", extract_table_id(sig)); query.bindValue(":VERSION", extract_version(sig)); query.bindValue(":ENDTIME", extract_endtime(sig)); if (!query.exec()) MythDB::DBError("Error updating eitcache", query); return; }