PHP - Moved: Question About Dates
This topic has been moved to MySQL Help.
http://www.phpfreaks.com/forums/index.php?topic=305964.0 Similar TutorialsThis topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=320857.0 This should be simple but I cant figure it out. Basically, I just need to only display titles that have thumbnails, and it should always show titles with dates from the next two months. Therefore, since it is October, it should show the October and November titles, if it's November, it shows Nov and Dec, etc. The part of the code i need help with is at the bottom. [syntax=php]<?php $width = 940; $height = 277; $classtext = ''; $titletext = get_the_title(); $date = print(Date("l F d, Y")); $thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext,false); $thumb = $thumbnail["thumb"]; ?> <?php // if there's a thumbnail if($thumb != '' && $date == ? ) { ?>[/syntax] This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=321426.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=318249.0 Hi All, I need to subtract dates and display the number of days left. I have a 'Start' date and an 'End' date in DATETIME format in the DB. Not quite sure where to start. A simply start - end doesn't work . Start = 2011-11-01-00:00:00 End = 2011-11-30-23:59:59 Since it is now 2011-11-27, my output should equal 3. Any help is appreciated. Hi guys, I am trying to do a multidates events availability calender. The script below indicates todays date by highlighting an orange colour and also indicates the start and end date of the event highlighting grey colour on the two dates (The colour are link via css classes as shown). Code: [Select] //Today's date $todaysDate = date("d/m/Y"); $dateToCompare = $daystring . '/' . $monthstring . '/' . $year; echo "<td align='center' "; if($todaysDate == $dateToCompare){ echo "class='today'"; }else{ //Compare's the event dates $sqlcount = "select event_start,event_end from b_calender where event_start ='".$dateToCompare."' AND event_end='".$dateToCompare."'"; $noOfEvent = mysql_num_rows(mysql_query($sqlcount)); if($noOfEvent >= 1){ echo "class='event'"; } } It works ok i.e. if start date = 01/01/2012 and end date = 04/01/2012 both date will be highlighted with grey colour. However I want it to also highlight grey on the dates between the 1st and 4th to show that then anydates between the 1st and 4th are not available and this is when I'm stuck. Please guys I need help. Thanks This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=342468.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=345714.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=321972.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=315227.0 This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=307000.0 Amazingly, threads about application design belong in the Application Design sub-forum. This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=358384.0 This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=353404.0 This topic has been moved to Application Frameworks. http://www.phpfreaks.com/forums/index.php?topic=357345.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=342707.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=354997.0 This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=317879.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=321915.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=310658.0 This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=357263.0 |