mirror of
				https://github.com/ElvishArtisan/rivendell.git
				synced 2025-10-31 14:13:52 +01: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:
		| @@ -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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user