There are 2 long-standing bugs in the database join element that I sure wish someone knew how to fix.
1. You cannot edit an existing databasejoin element to change it from a standard dropdown to multiselect dropdown. (And probably the other way around too). Well you 'can' - but it then causes all sorts of issues and bugs.
2. Then if you try to delete that database join element to 'start over again' (because you made the 'mistake' of thinking #1 would actually work) you will get an error like this when it comes to removing the existing table as part of "Empty trash"....
An error has occurred.
1. You cannot edit an existing databasejoin element to change it from a standard dropdown to multiselect dropdown. (And probably the other way around too). Well you 'can' - but it then causes all sorts of issues and bugs.
2. Then if you try to delete that database join element to 'start over again' (because you made the 'mistake' of thinking #1 would actually work) you will get an error like this when it comes to removing the existing table as part of "Empty trash"....
An error has occurred.
1051 Unknown table 'fb_reports_repeat_param_hospital_type' SQL=DROP TABLE `fb_reports_repeat_param_hospital_type`
..........
The database join element I'm trying to delete is in a repeat group. The full name is "fb_breakouts___param_hospital_type".
Yet this error shows that the code is trying to delete the associated 'repeat' table BUT using the parent table name (fb_reports) prefix.
I'm pretty sure this bug was introduced just recently because at one time I remember posting that those 'repeat' tables were not being deleted when you deleted the element. So it looks like the intent to fix that issue was addressed - just not so well.