jester626 Posted July 30, 2006 Share Posted July 30, 2006 I managed to get my previous problem worked out with some help from the fine folks here. I am now back again looking for more help.To ReCap:I have a DB with a field called FollowUpDate and the data is in MySQL DATE format (YYY-MM-DD). I have managed to restrict the data that comes out of the DB by using the following:WHERE FollowUpDate < DATE_SUB(NOW(), INTERVAL -5 DAY)Now comes the part I am stuck at. I am trying to figure out how to do some sort of IF statement that if the day has already passed to display a flashing animated gif to let me know it is past due.Anyone willing to give me a hand with the If statement?Thanks Quote Link to comment https://forums.phpfreaks.com/topic/16044-calculating-when-a-date-has-passed/ Share on other sites More sharing options...
digitalgod Posted July 30, 2006 Share Posted July 30, 2006 not sure if this is what you're asking for but it might get you started[code]<?php$today = date('Y-m-d');$result = mysql_query("SELECT * FROM yourTable WHERE FollowUpDate < DATE_SUB(NOW(), INTERVAL -5 DAY)") or die(mysql_error());while($row=mysql_fetch_array($result) {if ($row['FollowUpDate'] < $today) {//display pic} else {//don't display pic}}?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/16044-calculating-when-a-date-has-passed/#findComment-66092 Share on other sites More sharing options...
jester626 Posted July 30, 2006 Author Share Posted July 30, 2006 After some minor Modification it worked like a champ,Thanks.P.S. the Mods were database specific. Quote Link to comment https://forums.phpfreaks.com/topic/16044-calculating-when-a-date-has-passed/#findComment-66108 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.