Looking for (Music) Database with Rowspan

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martin Brunner

    Looking for (Music) Database with Rowspan

    Hello!

    I'm planning to make a music database for my own, but maybe someone else
    found a script which can what I wont so here is what I'm looking for:

    The Database only should have these fields:

    Country - Band - Recommended Songs - Rating

    And that's all. The only special thing about is that bands from the same
    country should be diesplayed together and also the table-element should
    be joind with "rowspan = x".

    For example:

    +-----------+-------------+-------------+-------+
    | | CMX | Song 1 | ***** |
    | Finland +-------------+-------------+-------+
    | | Sara | Tyrri | *** |
    | | | CCCP | |
    +-----------+-------------+-------------+-------+
    | Sweden | GBX Sound | Knäckebröt | ** |
    +-----------+-------------+-------------+-------+

    See? Finland has a rowspan=2 in this column because there are two
    Finnish bands in the list. That two songs of "Sara" are in the list
    doesn't matter as it is in the same row.

    Also the Rating is not important, I planned that there are 4 persons who
    can rate on this site, but if we can just drop comments, it would be ok.

    Maybe someone knows an easy-to-install PHP that can handle this with the
    rowspan.

    Thanks
  • Geoff Berrow

    #2
    Re: Looking for (Music) Database with Rowspan

    I noticed that Message-ID: <c7b4fd$1ps4u$1 @ID-819.news.uni-berlin.de>
    from Martin Brunner contained the following:
    [color=blue]
    >See? Finland has a rowspan=2 in this column because there are two
    >Finnish bands in the list. That two songs of "Sara" are in the list
    >doesn't matter as it is in the same row.
    >
    >Also the Rating is not important, I planned that there are 4 persons who
    >can rate on this site, but if we can just drop comments, it would be ok.
    >
    >Maybe someone knows an easy-to-install PHP that can handle this with the
    >rowspan.[/color]

    No, but it's an interesting problem.

    My first thought would be that you may need a second table keeping a
    tally of the number of entries per country. This value could be used to
    generate the rowspan.

    Maybe query this first to get arrays of countries and numbers of rows
    and then use the result to generate a series of queries, one per
    country?

    Feels a bit clumsy though.

    --
    Geoff Berrow (put thecat out to email)
    It's only Usenet, no one dies.
    My opinions, not the committee's, mine.
    Simple RFDs http://www.ckdog.co.uk/rfdmaker/

    Comment

    • FLEB

      #3
      Re: Looking for (Music) Database with Rowspan

      Regarding this well-known quote, often attributed to Geoff Berrow's famous
      "Wed, 05 May 2004 18:15:00 +0100" speech:
      [color=blue]
      > I noticed that Message-ID: <c7b4fd$1ps4u$1 @ID-819.news.uni-berlin.de>
      > from Martin Brunner contained the following:
      >[color=green]
      >>See? Finland has a rowspan=2 in this column because there are two
      >>Finnish bands in the list. That two songs of "Sara" are in the list
      >>doesn't matter as it is in the same row.
      >>
      >>Also the Rating is not important, I planned that there are 4 persons who
      >>can rate on this site, but if we can just drop comments, it would be ok.
      >>
      >>Maybe someone knows an easy-to-install PHP that can handle this with the
      >>rowspan.[/color]
      >
      > No, but it's an interesting problem.
      >
      > My first thought would be that you may need a second table keeping a
      > tally of the number of entries per country. This value could be used to
      > generate the rowspan.
      >
      > Maybe query this first to get arrays of countries and numbers of rows
      > and then use the result to generate a series of queries, one per
      > country?
      >
      > Feels a bit clumsy though.[/color]

      Why generate multiple queries? Query once for the totals, store them away,
      and make another large sorted query for the information.

      --
      -- Rudy Fleminger
      -- sp@mmers.and.ev il.ones.will.bo w-down-to.us
      (put "Hey!" in the Subject line for priority processing!)
      -- http://www.pixelsaredead.com

      Comment

      Working...