Julian,

The "as" field is just setting the name of the field or column. For example
in PHP, if you donīt use the "as somename", you must use array[2] (I just
use 2 as an example) instead of array['datefield'] to get the information.

Regards,

Ingvar G
Web accounting & CRM
us.logiledger.com

----- Original Message -----
From: "julian haffegee" <[EMAIL PROTECTED]>
To: "MySQL General List" <[EMAIL PROTECTED]>
Sent: Monday, December 31, 2001 2:55 PM
Subject: Re: date_format


> Thanks this works!!!!
>
> the difference was the 'AS datefield'
> what is this bit doing? I searched for AS (in the SELECT description in my
> book) but it does not mention it; though I have seen it in examples. I
like
> to understand why I use the code I do...
>
> I looked at http://www.mysql.com/ but can find no mention. Am I searching
> for the wrong thing? I searched for AS in the documentation
> thanks again Jules
>
>
> >
> > You may want to try:
> >
> > $result = mysql_query("SELECT title, description, url, author,
> > date_format(datefield, '%M %D %Y') AS datefield FROM documents");
> >
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to