cturner Posted October 20, 2006 Share Posted October 20, 2006 Can someone please tell me how I can do what is in the subject? Thanks in advance.Here is the code that I am working with:[code]require "config2.php";// display each article title with the date// get the current day$currentday = date("j",mktime());// get the current month$currentmonth = date("F",mktime());// get the current year$currentyear = date("Y",mktime());// select the current article//$currentquery = mysql_query("SELECT * FROM `items` ORDER BY STR_TO_DATE(CONCAT(selectDay, selectMonth, selectYear), '%d%M%Y') DESC");$currentquery = mysql_query("SELECT * FROM `items`");while($row = mysql_fetch_array($currentquery)) { echo "<br /><br /><a href=article.php?articleid=".$row['articleid'].">".$row['selectMonth']." ".$row['selectYear']."</a>";}// display the current article//while($row = mysql_fetch_array($currentquery)){ //echo "<br /><br />".$row['selectDay']." ".$row['selectMonth']." ".$row['selectYear']."<br />"; //echo "<a href=article.php?articleid=".$row['articleid'].">".$row['articletitle']."</a>";//}mysql_close();[code][/code][/code] Link to comment https://forums.phpfreaks.com/topic/24506-displaying-only-one-month-and-year-per-article/ Share on other sites More sharing options...
cturner Posted October 21, 2006 Author Share Posted October 21, 2006 Anyone please help urgent? Link to comment https://forums.phpfreaks.com/topic/24506-displaying-only-one-month-and-year-per-article/#findComment-112167 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.