else { // If there is no table, simply check if the field exists as a field or
// an aliased field.
if ($existing_field['alias'
] ==
$field) { return $this;
} } } // Also check expression aliases.
foreach ($this->expressions
as $expression) { if ($expression['alias'
] ==
$this->connection->
escapeAlias($field)) { return $this;
} } // If a table loads all fields, it can not be added again. It would
// result in an ambiguous alias error because that field would be loaded
// twice: Once through table_alias.* and once directly. If the field
// actually belongs to a different table, it must be added manually.
foreach ($this->tables
as $table) { if (!
empty($table['all_fields'
])) { return $this;
}