Commit 596c4ee7 authored by Axel Auweter's avatar Axel Auweter
Browse files

Column names should only be printed once...

parent 2c3b8022
......@@ -35,7 +35,10 @@ void DCDBQuery::doQuery(const char* hostname, std::list<std::string> sensors, DC
exit(EXIT_FAILURE);
}
/* Iterate over list of sensors requestes by the user */
/* Print the CSV header */
std::cout << "Sensor,Time,Value" << std::endl;
/* Iterate over list of sensors requested by the user */
for (std::list<std::string>::iterator it = sensors.begin(); it != sensors.end(); it++) {
/* Lookup the sensor in the published sensors table */
std::string sensorPattern;
......@@ -51,8 +54,6 @@ void DCDBQuery::doQuery(const char* hostname, std::list<std::string> sensors, DC
}
#endif
/* Print the CSV header */
std::cout << *it << ",Time,Value" << std::endl;
querySensorsCSV(session, *it, sidList, start, end, raw);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment