mickeyb Posted April 26, 2008 Share Posted April 26, 2008 Hi My mysql version is 4.1.22-standard I run a PHP-MYSQL based fantasy soccer league and, apart from tinkering with scores occasionally through PHPMyadmin, I'm a newbie at this At the moment fantasy team managers pick 11 players on a Flash soccer pitch and submit their team to the database which calculates the weekly points each player scores and builds a standings table through php I'v found a way to get the flash pitch to handle a squad system - 16 players for each team (11 and 5 reserves). This way managers can drag and drop players into the first 11 places on the pitch, save to the database and that is their team for the weekend. The trouble is that the database builds the standings using the scores from all 16 players. How difficult would it be to get the database to just build it from the first 11 players listed? Would it require a lot of work or just some tweaks to the database and php script cheers Mickey Mickey Quote Link to comment Share on other sites More sharing options...
webent Posted April 26, 2008 Share Posted April 26, 2008 Coun't you do something like... SELECT SUM(score) FROM table WHERE team = '$team' LIMIT 11 Haven't ever tried but it seems like it should work. Quote Link to comment Share on other sites More sharing options...
mickeyb Posted April 26, 2008 Author Share Posted April 26, 2008 Hi thanks for replying. as I said I'm a total newbie who maybe should take a course in all this - but I seem to be so close to getting a result do I add that code to the php script that creates the table? or does it need to be part of the database? cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.