DoobyWho
09-03-2002, 12:28 AM
I should know this , but i dont know why i dont. lol. Okay, i need this to work:
user goes to page, enters a date of an event, a link, and a event description.
on the calender page, it displays the events in order of the one thats coming up the soonest. and it displays only the month and day , like "September 11" , and the link and details. Once that date has past, it deletes the calender event from the database.
Any ideas?
God its cause its late , lol. im soooooooo tired. i can't think. i seriously forgot my sons name a few minutes ago.
shaunewing
09-03-2002, 01:51 AM
Depending on how you've setup the database structure (and assuming you know how to pluck multiple matches with PHP), couldn't you do something like:
"SELECT * FROM entries ORDER BY date DESC" ?
Then you could have something run regularly (cron, etc) that goes through and checks to see if entrydate < todaysdate... if it is, then deletes it?
--Shaun
jtrovato
09-03-2002, 01:48 PM
I wrote a nice calendar app using PHP and MySQL. It has nice administration page. It shows a calendar of each month which you could change to the next or prev month and shows all events on each day. Highlights the current date. I put it together in a few hours, so it's not fully finished yet. I'm more than willing to show you the code...
this is what the calendar looks like, and of course you can change the colors.
http://24.184.184.214:81/bookings/calendar.php
jtrovato
09-03-2002, 01:49 PM
There are a few bugs I am working out now, Simple ones that I will fix in no time. This is also not the more recent version.
John
DoobyWho
09-03-2002, 04:14 PM
I've got it working now, but now i just have one bug.
I have the date stored , say "2003-03-02", in a date type column in the database
I want to echo out ONLY the month and day, so say "March 2",
$getthedate = $a_row['date'];
$eventdate = getdate($getthedate);
$eventmonth = $eventdate['month'];
$eventday = $eventdate['mday'];
$thedate = '$eventmonth $eventday';
isnt working. it echos out December 31st all the time. Any ideas?
shaunewing
09-04-2002, 12:08 AM
What about something like this:
$getthedate= $a_row['date'];
$thedate=strtotime($getthedate);
$thedate=date("F d", $thedate);
echo $thedate;
I tried it with sample values and it worked fine!
--Shaun
animegirlfan
09-04-2002, 10:39 AM
I need install the V Bulletin program, so I'm downloading at My Sql. Any questions?