|
Posted by jsd219 on 11/01/07 15:52
On Oct 31, 12:10 pm, "Shelly" <sheldonlg.n...@asap-consult.com> wrote:
> 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
Please forgive my ignorance but i can not wrap my head around this. is
what you are saying; query everything from the table and order it by
date? i don't understand the . $id part.
God bless
jason
[Back to original message]
|