set_and_exit(); } // SQL injection avoidance $setup_id = intval($_GET['setup_id']); require('query_to_csv.php'); query_to_csv('select count count, setup_ID setup_ID, time time, time_system_clock time_system_clock, time_utc time_utc, latitude latitude, longitude longitude, altitude altitude, gps_speed `gps_speed [km/h]`, x_accel `x_accel [m/s^2]`, y_accel `y_accel [m/s^2]`, z_accel `z_accel [m/s^2]`, x_gyro x_gyro, y_gyro y_gyro, z_gyro z_gyro, compass compass, number_satelites number_satelites, accuracy accuracy, gps_bearing gps_bearing, speed `speed [km/h]`, engine_load `engine_load [%]`, engine_rpm `engine_rpm [RPM]`, maf `maf [g/s]`, accelerator_pedal `accelerator_pedal [%]`, ambient_air_temp `ambient_air_temp [°C]` from rawdata where setup_id =' . $setup_id, true, 'rawdata-' . $setup_id);