#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2008
    Posts
    80
    Rep Power
    6

    Build Table/Grid Using Multiple Searches


    Here's what I am trying to do:

    I need to build a table, or a grid, in order to display some query results.

    There are 7 columns (one for each day of the week).

    From there, under each day/column, it would list the events of the day. Some events are longer/short than others, and some days have more events than others. Each event is calculated in 30 min increments, since some events start on the half hour.

    Currently, I am doing a separate query for each day of the week (or column). But its causing me to not have an even table, and things are not lining up correctly.

    Is something like this even possible? Am I approaching this the wrong way?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2008
    Posts
    80
    Rep Power
    6
    I realize that I didnt do a great job of explaining what I was after, and i apologize for that.

    i have a programming schedule that i want to display, in a grid/table format. there are 7 columns, one for each day of the week. my results are stored in a database, by start time, end time, and the day of the week that it airs.

    What I originally tried to do was set up the table, and each column for the day did an individual query setting up a new table in each column, searching only for that day. It proved ineffective, and the rows were unable to "match up" based on starting time, due to the fact that certain days had 1 or 2 programs more than the previous day.

    Is there a way though, in which i can do the entire query and sort by day of the week, then by start time (which i already know how to do)...

    ... but then display the results horizontally... for example, still have the result sorted by day of the week and in time order, by have them further sorted by having the results sorted Sunday through Saturday, then Sunday through Saturday, etc... and then when it gets to the "8th" result in the loop, it starts a new column.

    so for example, the resulting query would look like this:

    Day of Week-Program Title-Start Time

    Sunday-Program A-12:00 AM
    Monday-Program B-12:00 AM
    Tuesday-Program C-12:00 AM
    Wednesday-Program D-12:00 AM
    Thursday-Program E-12:00 AM
    Friday-Program F-12:00 AM
    Saturday-Program G-12:00 AM
    Sunday-Program H-5:00 AM
    Monday-Program I-6:00 AM
    ...etc

IMN logo majestic logo threadwatch logo seochat tools logo