Re: simple events calendar using mysql



jsd219 wrote:
My appologies, i know how to do the query but i do not know how to
tell the code to display the title and a link to a trip that matches
the date. in other words where in the code below do i say ok, now that
the calendar is displayed, if 10/31/2007 has a trip in the database

You don't! What I mean by that it is not "now that the calendar is
displayed,". You have to put it in AS you are building your display!

In other words, when you do your query, have it ordered by date (ORDER BY
the_date_field). Then build an array with all those rows. Now, as you are
going about building the display of your calendar, check the date against
the next one in the array. If it matches, then do an

echo 'value="' . $whatever_info_you_want_to_appear_here . '"'; (that last
was single-double-single quotes).

and increment your position in the array so that the next time you check the
date it will be the next one in the array. (Of course, stop all this
checking once you have done all the elements in the array so that you are
not going to get an out-of-bounds problem).

Do you understand now?

Shelly


.



Relevant Pages

  • multiple table rows into an array, and creating a calendar
    ... set up a query to select all the dates within the current month. ... got a calendar which shows one month at a time, as a table, on which to ... display the relevant dates as links. ... results of my query into an array. ...
    (php.general)
  • Re: help urgent
    ... Declare a dynamic array of stuctures. ... > in the event handler should display an OpenFileDialog allowing the user ... load the date from each array member into the combo box. ...
    (microsoft.public.vb.general.discussion)
  • Re: pass an array throuh a function
    ... >The array would record the data from the user from one function.AND another ... >once the user is done and send it to the display function. ... your displayfunction is going through a loop. ... int count; ...
    (alt.comp.lang.learn.c-cpp)
  • Re: error 3048 - Cannot open any more databases
    ... recommendations and I declared my array as static and also loaded the array ... Yes the bound column of my combo boxes are not the display column. ... the same subform, just inserted 48 times. ...
    (microsoft.public.access.formscoding)
  • Re: error 3048 - Cannot open any more databases
    ... I am having a hard time creating a multidimensional array. ... Yes the bound column of my combo boxes are not the display column. ... the same subform, just inserted 48 times. ...
    (microsoft.public.access.formscoding)