Ok, I'm currently making a mod for a ladder script. The Database works like this:
You sign up, selecting what ladder you want to join, and then all your information.
Each ladder has a different database, 'ladder_#', which holds all of the teams statistics.
The information is sent to a table named, 'teams'.
This table contains which # ladder the team is in.
How can I draw statistics from a random team? (Who's rank is greater than 0)
I tried the following:
Code:$statsql="SELECT * FROM teams,ladder_'teams.ladderid' WHERE ladder_'teams.ladderid'.rank > 0 ORDER BY rand() LIMIT 1"; $statsqlr=mysql_query($statsql); $stats=mysql_fetch_array($statsqlr);
Obviously, this didn't work.
Any suggestions?
Also, if you don't understand my explination of how the database works, please make it known so that I can attempt to explain it better.
Thanks in advance!
- Cliff



) if you add:

Bookmarks