You are here: Re: FormatDateTime in PHP « PHP Programming Language « IT news, forums, messages
Re: FormatDateTime in PHP

Posted by Justin Koivisto on 10/06/50 11:36

John K wrote:
> I tried it didn't produce a result (the date that is). Time produced
> result however.
>
> This is what I put in. Did I do something wrong?
>
> <?php
> mysql_select_db($database_hthConnect, $hthConnect);
> $query_gigRecall = "SELECT DATE_FORMAT('%M %e,
> %Y',tbl_gigs.fld_gig_Date) as fld_gig_Date, tbl_gigs.fld_gig_Time,
> tbl_gigs.fld_gig_Place FROM tbl_gigs";
> $gigRecall = mysql_query($query_gigRecall, $hthConnect) or
> die(mysql_error());
> $row_gigRecall = mysql_fetch_assoc($gigRecall);
> $totalRows_gigRecall = mysql_num_rows($gigRecall);
> ?>
>

maybe it has to do with the name... try this instead:

DATE_FORMAT('%M %e, %Y',tbl_gigs.fld_gig_Date) as formatGigDate

and then:
<?php echo $row_gigRecall['formatGigDate']; ?>

--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация