List:General Discussion« Previous MessageNext Message »
From:burhan.khalid Date:August 19 2010 5:53pm
Subject:Re: Fixture List generation using MySQL
View as plain text  
One possible approach: In your script, generate some ordered iterable object with an index of your team names. Step through it in a loop and check the counter; match "odd" teams with "even" teams and generate your queries.

You could probably do this on the server end as well as the logic is quite simple.

Regards,
--
Burhan Khalid
Sent from my BlackBerry® smartphone from Wataniya Telecom

-----Original Message-----
From: Peter Brawley <peter.brawley@stripped>
Date: Thu, 19 Aug 2010 12:48:18 
To: <mysql@stripped>
Reply-To: peter.brawley@earthlink.net
Subject: Re: Fixture List generation using MySQL



>I'm looking at a routine / script to create the fixtures like

>team 1 vs team 2
>team 3 vs team 4
>team 5 vs team 6 etc

Build the script round the query.

PB

-----

On 8/19/2010 12:07 PM, Tompkins Neil wrote:
> I'm looking at a routine / script to create the fixtures like
>
> team 1 vs team 2
> team 3 vs team 4
> team 5 vs team 6 etc
>
>>
>>
>> On Thu, Aug 19, 2010 at 3:44 PM, Peter Brawley<
>> peter.brawley@earthlink.net>  wrote:
>>
>>>
>>>   I'm tasked with generating a list of fixtures from a table of teams,
>>>> whereby
>>>> each team plays each other home and away.  Does anyone have any
>>>> experience
>>>> generating such information using MySQL ?
>>>>
>>> Basically ...
>>>
>>> select a.id,b.id from tbl a join tbl b on a.id<b.id;
>>> union
>>> select a.id,b.id from tbl a join tbl b on a.id>b.id;
>>>
>>> PB
>>>
>>>
> -----
>>>
>>>
>>> On 8/19/2010 9:12 AM, Tompkins Neil wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm tasked with generating a list of fixtures from a table of teams,
>>>> whereby
>>>> each team plays each other home and away.  Does anyone have any
>>>> experience
>>>> generating such information using MySQL ?
>>>>
>>>> Thanks for any
> input.
>>>>
>>>> Regards
>>>> Neil
>>>>
>>>>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=1@gmail.com

Thread
Fixture List generation using MySQLTompkins Neil19 Aug
  • Re: Fixture List generation using MySQLPeter Brawley19 Aug
  • Re: Fixture List generation using MySQLCarl19 Aug
    • Re: Fixture List generation using MySQLNeil Tompkins20 Aug
Re: Fixture List generation using MySQLTompkins Neil19 Aug
  • Re: Fixture List generation using MySQLPeter Brawley19 Aug
    • Re: Fixture List generation using MySQLburhan.khalid19 Aug
  • RE: Fixture List generation using MySQLGavin Towey19 Aug
    • Re: Fixture List generation using MySQLTompkins Neil20 Aug