Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Nov 2005
    Posts
    2
    Member #
    11879
    Hey i am trying to make a calende3r coded purely in PHP and mysql. And well ive reached a hump. I can get the data to echo correctly and everthing, and i can get the data to sort correctly into the specified dates based on the timestamp.
    now here is my problem.

    The current method i use to get the data to display within the calender is to loop through the calender creation script, and call a MYSQL query every time the loop executes. now i know this really isnt the best way to do this, so i need to know of a better way. i have thought about sorting the data into an array , but that just seems inneficient.
    also, in your opinion what would be the best way to dislay multiple events on a celender if the cells are 55x64 pixels?

  2.  

  3. #2
    Senior Member hagen's Avatar
    Join Date
    Aug 2005
    Posts
    408
    Member #
    10882
    Liked
    1 times
    i dont understand exactly the scenario, so cant comment precisely, but...

    I guess you know you dont need to connect to the sql server each time you go through the loop....

    and sql is pretty optimised for exactly this kind of thing so you may be surprised actually how efficient it already is....
    Hagen Rose: hagen(at)jxwd(dot)co(dot)uk
    JX Web Development, Bournemouth, Dorset...JXWD.co.uk

  4. #3
    Junior Member
    Join Date
    Nov 2005
    Posts
    2
    Member #
    11879
    well i know i dont need to, but i want to know how i wouldnt need to...
    hope you get what i mean

  5. #4
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Some sort of sample code or pseudocode would help. Or a page to refer to, at least, to see the final results. Database structure, etc.

    Regardless, you might want to look into SQL JOINs, they might help you (I'm not 100% sure, since your post was a bit vague).

    As for multiple events in fixed-height/width cells, you could technically limit the amount of text you output and then use Javascript to make it so that when you hover over the cell you see the full contents. Or you could put a link inside each cell that says `X events' where X is the amount of events and that link takes you to a page with the relevant information. Or you could use a hybrid of the above, showing the full event if there's only one event, having a hover over the link, and then also having a separate page. There are a variety of ways to deal with it :-)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:09 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com