On Mon, 25 Aug 2003 13:46:02 +0200
"Ricki Susic" <ri*************@webfabrikken.net> wrote:
"SELECT ID,tekst DATE_FORMAT(dato, '%Y %m %d') as dato FROM ..."
Hi Matt,
That was it! Now it works out fine. I'm a little confused though - why
should it be necessary to define the column twice:
DATE_FORMAT(column_name, '%d %m %Y') as column_name in ..........
You know what I mean?!
Ricki
You never actually said "SELECT dato ", you asked MySQL "SELECT
DATE_FORMAT(...)". If you didn't give the return vale from the function
a name the column name would be"DATE_FORMAT(column_name,'%d %m
%Y')", it should be said that you can call that column anything you like
(except a reserved word I would guess). It is my own personal
preference to call the return value the same name as the column you are
passing as a parameter.
Maybe to keep MySQL fast the developers droped out needless code which
doesn't bother to give the return value from a function a name(i.e
expr1, ala Access.)
(*wipes brow* hoping the above makes some sort of sense)
Matt
--
Quispiam Power Computing | "There are two major products that come out
Pendle Hill, Australia | of Berkeley: LSD and UNIX. We don't believe
+61 2 9688 2894 | this to be a coincidence. "
www.quispiam.com | - Jeremy S. Anderson