mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-08-02 08:59:33 +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.
|
compatibility.
|
||||||
2018-07-18 Fred Gleason <fredg@paravelsystems.com>
|
2018-07-18 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Removed 'sas_switch_torture' and 'sas_torture' from 'tests/'.
|
* 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";
|
tablename="GPOS";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sql=QString().sprintf("select NUMBER,OFF_MACRO_CART,MACRO_CART from %s \
|
sql=QString("select ")+
|
||||||
where (STATION_NAME=\"%s\")&&\
|
"NUMBER,"+ // 00
|
||||||
(MATRIX=%d)&&\
|
"OFF_MACRO_CART,"+ // 01
|
||||||
(NUMBER<=%d) order by NUMBER desc",
|
"MACRO_CART "+ // 02
|
||||||
(const char *)tablename,
|
"from "+tablename+" where "+
|
||||||
(const char *)rda->station()->name(),
|
"(STATION_NAME=\""+RDEscapeString(rda->station()->name())+"\")&&"+
|
||||||
gpi_matrix->matrix(),last_line);
|
QString().sprintf("(MATRIX=%d)&&",gpi_matrix->matrix())+
|
||||||
|
QString().sprintf("(NUMBER<=%d) ",last_line)+
|
||||||
|
"order by NUMBER desc";
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
if(q->size()<count_limit) {
|
if(q->size()<count_limit) {
|
||||||
count_limit=q->size();
|
count_limit=q->size();
|
||||||
@ -640,13 +642,15 @@ void MainWidget::UpdateLabelsDown(int first_line)
|
|||||||
tablename="GPOS";
|
tablename="GPOS";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sql=QString().sprintf("select NUMBER,OFF_MACRO_CART,MACRO_CART from %s \
|
sql=QString("select ")+
|
||||||
where (STATION_NAME=\"%s\")&&\
|
"NUMBER,"+ // 00
|
||||||
(MATRIX=%d)&&\
|
"OFF_MACRO_CART,"+ // 01
|
||||||
(NUMBER>=%d) order by NUMBER",
|
"MACRO_CART "+ // 02
|
||||||
(const char *)tablename,
|
"from "+tablename+" where "+
|
||||||
(const char *)rda->station()->name(),
|
"(STATION_NAME=\""+RDEscapeString(rda->station()->name())+"\")&&"+
|
||||||
gpi_matrix->matrix(),first_line);
|
QString().sprintf("(MATRIX=%d)&&",gpi_matrix->matrix())+
|
||||||
|
QString().sprintf("(NUMBER>=%d) ",first_line)+
|
||||||
|
"order by NUMBER";
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
while(q->next()&&(count<(GPIMON_ROWS*GPIMON_COLS))) {
|
while(q->next()&&(count<(GPIMON_ROWS*GPIMON_COLS))) {
|
||||||
gpi_labels[count]->setLine(q->value(0).toInt()-1);
|
gpi_labels[count]->setLine(q->value(0).toInt()-1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user