Attempting to fix mysql issue with trying to select an ambiguous field name in a query.