2018-07-05 Fred Gleason <fredg@paravelsystems.com>

* Added an 'ELR_LINES' table to the database.
	* Incremented the database version to 289.
	* Removed the 'RDSvc::serviceTableName()' method.
This commit is contained in:
Fred Gleason
2018-07-05 08:52:38 -04:00
parent 300aebdc04
commit db70aa4550
32 changed files with 631 additions and 392 deletions

View File

@@ -2,7 +2,7 @@
//
// Export a Rivendell Report to an ASCII Text File.
//
// (C) Copyright 2002-2005,2016-2017 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2002-2005,2016-2018 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -22,11 +22,13 @@
#include <qfile.h>
#include <qmessagebox.h>
#include <rddb.h>
#include <rdlog_line.h>
#include <rdairplay_conf.h>
#include <rdconf.h>
#include <rddatedecode.h>
#include <rddb.h>
#include <rdescape_string.h>
#include <rdlog_line.h>
#include <rdreport.h>
bool RDReport::ExportTextLog(const QString &filename,const QDate &startdate,
@@ -51,29 +53,24 @@ bool RDReport::ExportTextLog(const QString &filename,const QDate &startdate,
else {
cart_fmt="%6u";
}
sql=QString().sprintf("select `%s_SRT`.LENGTH,`%s_SRT`.CART_NUMBER,\
`%s_SRT`.EVENT_DATETIME,`%s_SRT`.EVENT_TYPE,\
`%s_SRT`.EXT_START_TIME,`%s_SRT`.EXT_LENGTH,\
`%s_SRT`.EXT_DATA,`%s_SRT`.EXT_EVENT_ID,\
`%s_SRT`.TITLE,CART.FORCED_LENGTH,\
`%s_SRT`.STATION_NAME,`%s_SRT`.PLAY_SOURCE,\
`%s_SRT`.CUT_NUMBER from `%s_SRT` left join CART on\
`%s_SRT`.CART_NUMBER=CART.NUMBER\
order by EVENT_DATETIME",
(const char *)mixtable,
(const char *)mixtable,
(const char *)mixtable,
(const char *)mixtable,
(const char *)mixtable,
(const char *)mixtable,
(const char *)mixtable,
(const char *)mixtable,
(const char *)mixtable,
(const char *)mixtable,
(const char *)mixtable,
(const char *)mixtable,
(const char *)mixtable,
(const char *)mixtable);
sql=QString("select ")+
"ELR_LINES.LENGTH,"+
"ELR_LINES.CART_NUMBER,"+
"ELR_LINES.EVENT_DATETIME,"+
"ELR_LINES.EVENT_TYPE,"+
"ELR_LINES.EXT_START_TIME,"+
"ELR_LINES.EXT_LENGTH,"+
"ELR_LINES.EXT_DATA,"+
"ELR_LINES.EXT_EVENT_ID,"+
"ELR_LINES.TITLE,"+
"CART.FORCED_LENGTH,"+
"ELR_LINES.STATION_NAME,"+
"ELR_LINES.PLAY_SOURCE,"+
"ELR_LINES.CUT_NUMBER "+
"from ELR_LINES left join CART "+
"on ELR_LINES.CART_NUMBER=CART.NUMBER where "+
"SERVICE_NAME=\""+RDEscapeString(mixtable)+"\" "+
"order by EVENT_DATETIME";
q=new RDSqlQuery(sql);
//