2016-06-10 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in 'lib/rdlist_logs.cpp' that failed to process
	SQL NULL date values correctly.
This commit is contained in:
Fred Gleason
2016-06-10 17:38:15 -04:00
parent c19b241907
commit 815dea346c
2 changed files with 11 additions and 6 deletions

View File

@@ -15222,3 +15222,6 @@
2016-06-10 Fred Gleason <fredg@paravelsystems.com> 2016-06-10 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'rdairplay/list_logs.cpp' that failed to process * Fixed a bug in 'rdairplay/list_logs.cpp' that failed to process
SQL NULL date values correctly. SQL NULL date values correctly.
2016-06-10 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'lib/rdlist_logs.cpp' that failed to process
SQL NULL date values correctly.

View File

@@ -163,12 +163,14 @@ void RDListLogs::RefreshList()
if(services_list.size()==0) { if(services_list.size()==0) {
return; return;
} }
sql=QString().sprintf("select NAME,DESCRIPTION,SERVICE from LOGS \ sql=QString("select NAME,DESCRIPTION,SERVICE from LOGS ")+
where (TYPE=0)&&(LOG_EXISTS=\"Y\")&&\ "where (TYPE=0)&&(LOG_EXISTS=\"Y\")&&"+
((START_DATE<=\"%s\")||(START_DATE=\"0000-00-00\"))&&\ "((START_DATE<=\""+current_date.toString("yyyy-MM-dd")+"\")||"+
((END_DATE>=\"%s\")||(END_DATE=\"0000-00-00\"))&&(", "(START_DATE=\"0000-00-00\")||"+
(const char *)current_date.toString("yyyy-MM-dd"), "(START_DATE is null))&&"+
(const char *)current_date.toString("yyyy-MM-dd")); "((END_DATE>=\""+current_date.toString("yyyy-MM-dd")+"\")||"+
"(END_DATE=\"0000-00-00\")||"+
"(END_DATE is null))&&(";
for ( QStringList::Iterator it = services_list.begin(); for ( QStringList::Iterator it = services_list.begin();
it != services_list.end(); ++it ) { it != services_list.end(); ++it ) {
sql+=QString().sprintf("SERVICE=\"%s\"||", sql+=QString().sprintf("SERVICE=\"%s\"||",