You are here: Re: simple events calendar using mysql « PHP Programming Language « IT news, forums, messages
Re: simple events calendar using mysql

Posted by Shelly on 10/31/07 17:10

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация