Ysurac / FlightAirMap

Open source project displaying live aircrafts, ships or trackers on 2D/3D map. Browse through the data based on a particular aircraft, airline, airport, tracker or vessel to search through the database or see extensive statistics. Can use ADS-B in SBS1 format (dump1090, Radarcape,...), VRS, VA (VATSIM, IVAO whazzup.txt, phpvms,...), ACARS (acarsdec, acarsdeco2), APRS, AIS as datasource.
https://www.flightairmap.com/
GNU Affero General Public License v3.0
516 stars 157 forks source link

Error when attempting to download flight data #333

Closed nrkbeta closed 7 years ago

nrkbeta commented 7 years ago

When I attempt to download the flight data of a specific flight (e.g. /search/json?q=390&download=true), the resulting file simply returns an SQL error:

Invalid query : SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near ")" LINE 2: ...me like '%390%') OR (spotter_output.ident like '%390%') OR ) ^ Whole query: SELECT spotter_output.* FROM spotter_output WHERE spotter_output.ident <> '' AND ((spotter_output.aircraft_icao = '390') OR (spotter_output.aircraft_name like '%390%') OR (spotter_output.registration like '%390%') OR (spotter_output.pilot_id = '390') OR (spotter_output.pilot_name like '%390%') OR (spotter_output.ident like '%390%') OR ) ORDER BY spotter_output.date DESC LIMIT 25 OFFSET 0

I'm running the latest version of FlightAirMap on Debian 8 with Postgresql 9.6.