|
|
|||
Creating a Calendar
I have a student that wants to display a calendar with information for various days and leave blank the days for which no information was entered. I could do it with a crosstab query, but wondered if someone might have ideas on a better approach.
2 Replies
Comment by
KBenson
: Feb 16 2010 02:08 PM
You seem to imply you have a database of some sort through the "crosstab query" portion of your question, but I find the question in general to be rather ambiguous. There's no statement of which (if any) programming language is involved.
Depending on the goals and the language implemented in you could take a mainly procedural or query based approach to organizing the data. Personally, assuming you have a title, data, and description for each query, I would just do a simple query for that information within the date ranges I am displaying, ordered by date, and step through the results (displaying empty days as necessary) displaying events of interest.
Echoing the comment made by KBenson, I also found this question about calendar database programming a little ambiguous. Since you don't specifically state how you'd like this accomplished, I can only speculate the sort of solution that would appeal to you. Here's a Simple PHP Calendar tutorial by Angela Bradley that includes an approach for dealing with blank days:
while ( $blank > 0 )
{
echo "<td></td>";
$blank = $blank-1;
$day_count++;
}
|
|||
|