cooleofooleo
07-07-2007, 07:35 AM
I have a league with 15 teams, but I only want to show 5 teams at a time. However, one of these teams must be my team (TeamX).
So I need a select statement that will find TeamX and will return 5 teams with 3 teams above and 1 below it.
However, if TeamX is within the top 3, I just need to display the top 5 teams, and if TeamX is bottom of the league, I just need to display the 4 teams above it!
I have absolutely no idea how to go about doing this! Im using a mySQL database, developing an asp.net website with c#.net. (Sorry Microsoft - but cant afford SQL Server!)
So I need a select statement that will find TeamX and will return 5 teams with 3 teams above and 1 below it.
However, if TeamX is within the top 3, I just need to display the top 5 teams, and if TeamX is bottom of the league, I just need to display the 4 teams above it!
I have absolutely no idea how to go about doing this! Im using a mySQL database, developing an asp.net website with c#.net. (Sorry Microsoft - but cant afford SQL Server!)