mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-06-03 01:22:42 +02:00
2018-07-18 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up SQL quieries in 'utils/rdgpimon/' to ensure UTF-8 compatibility.
This commit is contained in:
parent
e7d48a3f99
commit
53fee4a393
@ -17166,3 +17166,6 @@
|
||||
compatibility.
|
||||
2018-07-18 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Removed 'sas_switch_torture' and 'sas_torture' from 'tests/'.
|
||||
2018-07-18 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Cleaned up SQL quieries in 'utils/rdgpimon/' to ensure UTF-8
|
||||
compatibility.
|
||||
|
@ -592,13 +592,15 @@ void MainWidget::UpdateLabelsUp(int last_line)
|
||||
tablename="GPOS";
|
||||
break;
|
||||
}
|
||||
sql=QString().sprintf("select NUMBER,OFF_MACRO_CART,MACRO_CART from %s \
|
||||
where (STATION_NAME=\"%s\")&&\
|
||||
(MATRIX=%d)&&\
|
||||
(NUMBER<=%d) order by NUMBER desc",
|
||||
(const char *)tablename,
|
||||
(const char *)rda->station()->name(),
|
||||
gpi_matrix->matrix(),last_line);
|
||||
sql=QString("select ")+
|
||||
"NUMBER,"+ // 00
|
||||
"OFF_MACRO_CART,"+ // 01
|
||||
"MACRO_CART "+ // 02
|
||||
"from "+tablename+" where "+
|
||||
"(STATION_NAME=\""+RDEscapeString(rda->station()->name())+"\")&&"+
|
||||
QString().sprintf("(MATRIX=%d)&&",gpi_matrix->matrix())+
|
||||
QString().sprintf("(NUMBER<=%d) ",last_line)+
|
||||
"order by NUMBER desc";
|
||||
q=new RDSqlQuery(sql);
|
||||
if(q->size()<count_limit) {
|
||||
count_limit=q->size();
|
||||
@ -640,13 +642,15 @@ void MainWidget::UpdateLabelsDown(int first_line)
|
||||
tablename="GPOS";
|
||||
break;
|
||||
}
|
||||
sql=QString().sprintf("select NUMBER,OFF_MACRO_CART,MACRO_CART from %s \
|
||||
where (STATION_NAME=\"%s\")&&\
|
||||
(MATRIX=%d)&&\
|
||||
(NUMBER>=%d) order by NUMBER",
|
||||
(const char *)tablename,
|
||||
(const char *)rda->station()->name(),
|
||||
gpi_matrix->matrix(),first_line);
|
||||
sql=QString("select ")+
|
||||
"NUMBER,"+ // 00
|
||||
"OFF_MACRO_CART,"+ // 01
|
||||
"MACRO_CART "+ // 02
|
||||
"from "+tablename+" where "+
|
||||
"(STATION_NAME=\""+RDEscapeString(rda->station()->name())+"\")&&"+
|
||||
QString().sprintf("(MATRIX=%d)&&",gpi_matrix->matrix())+
|
||||
QString().sprintf("(NUMBER>=%d) ",first_line)+
|
||||
"order by NUMBER";
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()&&(count<(GPIMON_ROWS*GPIMON_COLS))) {
|
||||
gpi_labels[count]->setLine(q->value(0).toInt()-1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user