treyjeff
asked on
Retrieving only month needed?
I am creating an event calendar and what it to display the current month of events but I would also like to be able to click on a month name (so July for eample) and have a page generated that displays all of Julys events.
What is the best way to store the date (when entering event dates) in order to achieve this?
Also to keep in mind, once June is over, all of Junes old events must be archived. Either into a mySQL table or into a text file.
What is the best way to store the date (when entering event dates) in order to achieve this?
Also to keep in mind, once June is over, all of Junes old events must be archived. Either into a mySQL table or into a text file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
well..
<?
$date = "2001-05-15"; // for may 15th
$link = mysql_connect($SQLHost, $SQLUser, $SQLPassword) OR DIE ("Unable To Connect To Database");
mysql_select_db($SQLDataba se, $link) OR DIE("Unable To Select To Database");
$sql="INSERT INTO tbl_name VALUES('$event_name', '$event_desc', '$date')";
$result = mysql_query($sql);
mysql_close($link);
?>
<?
$date = "2001-05-15"; // for may 15th
$link = mysql_connect($SQLHost, $SQLUser, $SQLPassword) OR DIE ("Unable To Connect To Database");
mysql_select_db($SQLDataba
$sql="INSERT INTO tbl_name VALUES('$event_name', '$event_desc', '$date')";
$result = mysql_query($sql);
mysql_close($link);
?>
you can get the date from a form.. with 3 select (1 for day, 1 for month, 1 for year)
Thanks!
ASKER