Is worth to know that when you query on multiple tables only the first row with each name is returned.
That is, if you are joining to tables with a column called 'name' you will receive only one field called name in the array and it will correspond to the one on the first table.
Is advisable to allways allias your columns in that stuation.