Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Jan 2006
    Posts
    73
    Thanks
    2
    Thanked 3 Times in 3 Posts

    Few problems with PHP.

    Well, I'm new here, looks great around here and was wondering if you guys could help me with my script.

    I am making a league script and have been doing good but there is a few things that I lack at with PHP and don't know how to do.

    I have a teams table and want to make some code that will make each team have an opposing team to play them, but cannot assign matches to teams that already have a match that week. For each match, I want the leader of the team to report the match and only them. How could I do this? Any help would be greatly appreciated.

  • #2
    Regular Coder
    Join Date
    Sep 2005
    Location
    Liverpool
    Posts
    226
    Thanks
    0
    Thanked 0 Times in 0 Posts
    But surely you also need to ensure that the following week has the same team playing a different team? and in turn not playing them again(well Home and Away matches aside) in the same season?

    A couple of years ago my very first php project was creating a set of scripts to run a chess league, I doon't know whether anyone ever used it though.

    However the files are still available via Quirm.net and if you look in the files, the auto-matches.php contains the code. This traverses the db table and created a whole season of matches for each team in the relevant division. The math involved was fairly complex...

    Be warned however that the code is horrible, but it was my first project.
    my mind is on a permanent tangent

  • #3
    New Coder
    Join Date
    Jan 2006
    Posts
    73
    Thanks
    2
    Thanked 3 Times in 3 Posts
    But surely you also need to ensure that the following week has the same team playing a different team? and in turn not playing them again(well Home and Away matches aside) in the same season?
    Ya, and thanks for a script reference. Code is a little messy to know what parts do what though lol.
    Last edited by xGIHavoc; 01-06-2006 at 03:32 PM.

  • #4
    Regular Coder
    Join Date
    Sep 2005
    Location
    Liverpool
    Posts
    226
    Thanks
    0
    Thanked 0 Times in 0 Posts
    told you it was my first script :-)
    my mind is on a permanent tangent

  • #5
    New Coder
    Join Date
    Jan 2006
    Posts
    73
    Thanks
    2
    Thanked 3 Times in 3 Posts
    lol, how does the script work? Like how many weeks, the actual random match generating and all that stuff.

  • #6
    Regular Coder
    Join Date
    Sep 2005
    Location
    Liverpool
    Posts
    226
    Thanks
    0
    Thanked 0 Times in 0 Posts
    from memory, it takes a value from the config which sets how long in weeks between the matches.

    the actual generating is so complicated math wise I doubt I could explain it! hmm maybe it would have been better if i hadn't said anything :grin:
    my mind is on a permanent tangent


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •