Sometimes field names are not updated following database field name changes - even when they’re re-selected. This has happened to me several times and caused queries to fail.
In this example, I decided to change the field name from exportformat_id to exf_id. I re-saved the connection - and Wappler correctly refleced the changes. I then re-selected the field names. In most cases everything is updated correctly, but as you can see here, the field used in the condition is not the same as the one appearing in the SQL preview - and running the query results in a 500 error due to the non-existent (old) field:
In case it’s useful to have another example, here is a case where I couldn’t get the correct condition to update despite reselecting several times. The only way was to edit the Server Connect php file directly.
I have two pages which are very similar; they include a list of letters, each of which performs a query and displays the results in a list. The main difference is that the pages query different tables. The required action files are also therefore very similar. Rather than start from scratch, I duplicated the Server Connect file and the corresponding App Connect file and made the necessary changes. However it didn’t work - due to an error with an unknown column.
Query builder showed the correct column name:
… but the action file included the name from the previous file (the file I had copied):
… so of course the query failed. This column name appears 4 times in the php file; in 2 cases is was correctly updated, in 2 cases it wasn’t. It was easy to debug and easy to edit the file, but this does seem to be a bug which could cause problems.