Don't like how `$joinTable` is used for two different things (set true here, but then there's a check immediately below it which is actually skipped in this case because it's in an elseif).

Recommend pulling the selectColumnsFromTable out till after this if/elseif/else block so the elseif isn't needed.