boney alex Posted April 19, 2007 Share Posted April 19, 2007 Hi, Im trying to add an event's calendar to my website. I have spent all day trying to get Obsidian's php event calendar to work but with no success at all. What I need is something very very similar to the birthday calendar available from the top nav bar of this forum. I have a reservation table with reservations that have a 'CollectionDate' and a 'ReturnDate'. I'd like to display each record on both of those dates. Any advice/tips/ knowledge of a good script and its whereabouts would be fantastic! Cheers Link to comment https://forums.phpfreaks.com/topic/47760-solved-struggling-with-a-php-event-calendar/ Share on other sites More sharing options...
trq Posted April 19, 2007 Share Posted April 19, 2007 Try Google, this forum is for helping people with actual code. Link to comment https://forums.phpfreaks.com/topic/47760-solved-struggling-with-a-php-event-calendar/#findComment-233302 Share on other sites More sharing options...
boney alex Posted April 19, 2007 Author Share Posted April 19, 2007 Yeah, I've been trying that but they all seem to be large zip files that are downloaded and are fairly impossible to customised to your needs Link to comment https://forums.phpfreaks.com/topic/47760-solved-struggling-with-a-php-event-calendar/#findComment-233306 Share on other sites More sharing options...
obsidian Posted April 19, 2007 Share Posted April 19, 2007 What format are your dates stored in? If you have them as a MySQL DATE, you could just run two queries to pull the events grouped separately, or if you just want them all together, run a single query like this: <?php $today = date('Y-m-d'); $sql = mysql_query("SELECT * FROM myTable WHERE CollectionDate = '$today' OR ReturnDate = '$today'"; if (mysql_num_rows($sql) > 0) { while ($x = mysql_fetch_assoc($sql)) { // Print out your event here } } ?> Hope this helps some. Link to comment https://forums.phpfreaks.com/topic/47760-solved-struggling-with-a-php-event-calendar/#findComment-233317 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.