deal with joined database results

This correct a problem when you deal with joined sql results. The fields name came in this format "table.field".
The current code replaces "table.field" with table[field], so it can be used with quotes to specify a literal string.