Selecting datas between a range

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Aravinthan
Forum Commoner
Posts: 84
Joined: Mon Jan 28, 2008 6:34 pm

Selecting datas between a range

Post by Aravinthan »

Hi guys,

I have a problem. I would like to retreive some datas between a range. Sounds easy right?

Well what if I say, that I need to select 6 others datas from a center data...

Exemple:

I have 30 teams right. So firs of all, they are split into 2 conferences, 15 each.
I can easly find the conferences of each team, Oh by the way, they are in another table( to find the conferences).. anyhow that's not the hardest part. I can do that easly.

So there are 15 teams, and lets say the vistor are seeing the 14th place team. What I need to show is:
9th place
10th place
11th place
12th place
13th place
14th place
15th place


If they are viewing the 15th place infos.... Well show
10th
to
15th

If they are viewing the 1st place infos:
1st
to
7th

And so on...
And the places are determined by this equation: (nhl_wins*2)+nhl_ot



I dont know if its clear....

If you have any question, just let me know.

Thanks,
Ara
Post Reply