469,609 Members | 1,681 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

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
Jul 17 '05 #1
2 1773
I noticed that Message-ID: <c7************@ID-819.news.uni-berlin.de>
from Martin Brunner contained the following:
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.


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/
Jul 17 '05 #2
Regarding this well-known quote, often attributed to Geoff Berrow's famous
"Wed, 05 May 2004 18:15:00 +0100" speech:
I noticed that Message-ID: <c7************@ID-819.news.uni-berlin.de>
from Martin Brunner contained the following:
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.


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.


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.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
-- http://www.pixelsaredead.com
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

28 posts views Thread by Greg Adourian | last post: by
19 posts views Thread by Logix | last post: by
6 posts views Thread by htmlrookie | last post: by
7 posts views Thread by Gawel | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.