Help - Search - Members - Calendar
Full Version: Any Assistance
Pixel2Life Forum > Help Section > PHP, ASP, MySQL, JavaScript and other Web/Database Programming Help
Tyler2499
Hi, currently I am building a league script of my own. I have most complete but what I would like to do is track a racers position change.

For example, one week RACER #1 is in first place in the standings then after our next race he drops one spot.

It could be me thinking to hard but I really don't know where to start with this. If anyone could point me in the right direction it'd be appreciated, thanks.
Blaatzorrr
Hm I'm not sure about what you really want to do but I guess you want to build a race game? .. But anyway if you want to make a list for who's number 1, 2 etc. The best thing is give the racer after every race points.. example:

Race 1:
#1.User <- Gets 3 points
#2.Player <- Gets 2 points
#3.Anyone <- Gets 1 points

Race 2:
#1.Anyone <- Gets 3 points
#2.User<- Gets 2 points
#3.Player <- Gets 1 points

Total:
#.User with 5 points
#.Anyone with 4 points
#.Player with 3 points

Understand? And you can do this with as many racers as you want bigwink.gif If you make a field in your database called 'points' and just add the amount of points after the race you need to order the racers with Asc/Desc smile.gif
Tyler2499
Alright, say after week 1 the standings are:
  1. Racer2
  2. Racer3
  3. racer1
  4. racer5
Then we have another race and after week 2 the standings are:
  1. Racer3
  2. Racer2
  3. Racer5
  4. Racer1
What i want to show is the position change in points.
Ex.
  1. Racer3 +1
  2. Racer2 -1
  3. Racer5 +1
  4. Racer1 -1
NDBoost
What RicardoC is explaining would work. If necessary i can work up a quick working example for you.. Just let me know if this is still an issue.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.