if you use *, it will become a problem: e.g.,
Code:
# this works just fine, as long as you don't also SELECT `example`
SELECT `one`,`two`,`three`,DATE_FORMAT( `example`,'%Y-%m-%d' ) as `example` ...
# however, this will cause an error:
SELECT *,DATE_FORMAT( `example`,'%Y-%m-%d' ) as `example` ...
# because you're trying to use `example` as an alias,
# when you've already selected a column with that name (via *).
# MySQL doesn't like the ambiguity.
SELECT *,DATE_FORMAT( `example`,'%Y-%m-%d' ) as `no_col_has_this_name` ...
# working fine again.
Bookmarks