jetpackmac Posted June 18, 2006 Share Posted June 18, 2006 Hi Everyone!I have a page where I'm using PHP to include some entries from a MySQL db. All the entries have a date field and I'm using the date field to display them in ascending order.What i'm trying to figure out is, how to display the MySQL entries starting from the current date to about 3 or 4 months in the future. All the other entries in the database wouldn't be displayed...Here's some code:[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--]---------------- Calling the database----------------<?php require_once('../Connections/GetFestDir.php'); ?><?phpmysql_select_db($database_GetFestDir, $GetFestDir);$query_GetFestDead = "SELECT *, DATE_FORMAT(deadline,'%b/%d') AS newDead FROM festdir ORDER BY `feststart` ASC";$GetFestDead = mysql_query($query_GetFestDead, $GetFestDir) or die(mysql_error());$row_GetFestDead = mysql_fetch_assoc($GetFestDead);$totalRows_GetFestDead = mysql_num_rows($GetFestDead);?>---------------- Displaying the Entries ---------------<div style="width: 140px; height: 260px; overflow: auto"> <table width="120" align="left"> <?php do { ?> <tr> <td><h2 align="left"><strong><?php echo $row_GetFestDead['newDead']; ?></strong><br> <a href="<?php echo $row_GetFestDead['link']; ?>" class="orange" target="_blank"><?php echo $row_GetFestDead['name']; ?></a> </h2></td> </tr> <?php } while ($row_GetFestDead = mysql_fetch_assoc($GetFestDead)); ?> </table></div>--------------------------------------------------------[!--colorc--][/span][!--/colorc--]Any thoughts?Thanks a ton!-JPM Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.