The greased landings is still not working. The SQL Query is still not looking for it.
$query = "SELECT p.*, UNIX_TIMESTAMP(p.submitdate) as submitdate,
UNIX_TIMESTAMP(p.modifieddate) as modifieddate,
u.pilotid, u.firstname, u.lastname, u.email, u.rank,
a.id AS aircraftid, a.name as aircraft, a.registration,
dep.name as depname, dep.lat AS deplat, dep.lng AS deplng,
arr.name as arrname, arr.lat AS arrlat, arr.lng AS arrlng
FROM " . TABLE_PREFIX . "pireps p
LEFT JOIN " . TABLE_PREFIX . "aircraft a ON a.id = p.aircraft
LEFT JOIN " . TABLE_PREFIX . "airports AS dep ON dep.icao = p.depicao
LEFT JOIN " . TABLE_PREFIX . "airports AS arr ON arr.icao = p.arricao
LEFT JOIN " . TABLE_PREFIX . "pilots u ON u.pilotid = p.pilotid
WHERE MONTH(submitdate) = {$month} AND YEAR(submitdate) = {$year} AND p.landingrate != 0 AND p.accepted = 1 AND u.retired = 0
ORDER BY p.landingrate DESC
LIMIT 5";
See the p.landingrate, it is only in the order by and where, it has not been instructed to look for it anywhere else.