stelhar_1999
-
Posts
5 -
Joined
-
Last visited
Never
Posts posted by stelhar_1999
-
-
let me explain a little, I have a database with songs (about 40 songs) and I count the hits for each one of them
e.g.
id | songname | hits
now i can retrieve the top 10 out of them but I want to display them in random order like
title1| 235
title3| 500
title2| 156
any ideas?
Thanks!!!
-
to be more precise here is the structure of my table "data"
[u]id|radioname |blabla|....|blabla|hits[/u]
1 |testradio|blabla|....|blabla|200
-------------------------------------------
2 | testradio2|blabla|....|blabla|7
So every entry is unigue and I want to have the top 10 radios, showing their percentage instead of hits!
The problem is that I can't take the sum of the top 10 radios with a query!
-
every entry in the db is unigue so there is no need for a GROUP BY, I think that is!!!
-
i want to make a top 10 using a field containing hits and show up a percentage in the results
What i try to do is to SUM the top 10 hits using a query like this:
"SELECT SUM(hits) as sumvotes ORDER BY sumvotes DESC LIMIT 10"
but The number that I get is the sum of all the hits in the db and not for the top 10
where am I wrong?
Show top ten songs (according to hits) but in random order
in PHP Coding Help
Posted
bump........