invernyx / smartcars-3-phpvms5-api

The API responsible for connecting smartCARS to phpVMS 5
MIT License
7 stars 7 forks source link

Fix landing rate display on phpvms7 #64

Closed Thien42 closed 1 year ago

Thien42 commented 1 year ago

Previous code always returned 0 as we should check the state column instead of the status one.

Use the SQL AVG function to simplify the code. Also limit the request to the latest 100 pireps to prevent overloading the database for pilots with too many pireps.