|
Posted by Justin Koivisto on 10/09/84 11:36
John K wrote:
> This is how I'm trying to do this at the moment, I should have included
> this first, sorry.
>
> <?php require_once('Connections/hthConnect.php'); ?>
> <?php
> mysql_select_db($database_hthConnect, $hthConnect);
> $query_gigRecall = "SELECT tbl_gigs.fld_gig_Date,
> tbl_gigs.fld_gig_Time, tbl_gigs.fld_gig_Title, tbl_gigs.fld_gig_Place
> FROM tbl_gigs WHERE tbl_gigs.fld_gig_Date >= CURDATE()";
> $gigRecall = mysql_query($query_gigRecall, $hthConnect) or
> die(mysql_error());
> $row_gigRecall = mysql_fetch_assoc($gigRecall);
> $totalRows_gigRecall = mysql_num_rows($gigRecall);
> ?>
> <span class="midYellowCaps"><?php echo $row_gigRecall['fld_gig_Title'];
> ?></span><br>
> HERE WHERE I'M TRYING TO FORMAT THE DATE BELOW
> <?php echo $row_gigRecall['fld_gig_Date']; ?> at <?php echo
> $row_gigRecall['fld_gig_Time']; ?>
Why not just retrieve the date in that format with the query?
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
SELECT
DATE_FORMAT('%M %e, %Y',tbl_gigs.fld_gig_Date) as fld_gig_Date,
tbl_gigs.fld_gig_Time, tbl_gigs.fld_gig_Title, tbl_gigs.fld_gig_Place
FROM tbl_gigs WHERE tbl_gigs.fld_gig_Date >= CURDATE()
--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com
[Back to original message]
|