Terry , thank you .
The query worked on it's own, but within the PHP it
got thrown back. Alias worked well.
Sorry , sort of new to db / webdev.
Stuart
--- Terry Riley <[EMAIL PROTECTED]> wrote:
> Stuart, why not change your select statement
> (assuming it is correct and
> actually works, in and of itself) to give the
> date-formatted field an
> alias:
>
> SELECT
>
LFWJobBank.JobReferenceCode,DATE_FORMAT(LFWJobBank.Entered,'%m/%d/%Y')
> AS
> date_entered,
> LFWJobBank.DazeLeft, LFWJobBank.JobTitle
> FROM LFWJobBank
> WHERE VendorID = colname
>
> Then your php code should change to grab
> 'date_entered' (probably without
> having to format it once again). I don't use PHP
> that often, so I'm not
> sure of the right syntax myself - let someone else
> comment on that!
>
> But I do remember it is useful in testing to have
> php output the full
> SQL query text to the browser, just so you can see
> it is correct before
> proceeding.
>
> Cheers
> Terry
>
> ----- Original Message -----
>
> > Is there something wrong with this code ?
> > Still confused after reading the manual.
> >
> > <td><?php echo
> >
>
$rsJobShortDat->Fields('DATE_FORMAT('LFWJobBank'.'Entered','%m/%d/%Y'));
> > ?></td>
> >
> > "Entered" is a "timestamp" column.
> > With the apostrophes off the table / column I get
> > errors about unexpected % .
> >
> > Here is my SQL statement
> > SELECT
> >
>
LFWJobBank.JobReferenceCode,DATE_FORMAT(LFWJobBank.Entered,'%m/%d/%Y'),
> > LFWJobBank.DazeLeft, LFWJobBank.JobTitle
> > FROM LFWJobBank
> > WHERE VendorID = colname
> >
> > Thank you,
> > Stuart
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
>
http://lists.mysql.com/[EMAIL PROTECTED]
>
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]