Re: Fixture List generation using MySQL

2010-08-19 Thread burhan . khalid
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.braw...@earthlink.net
Date: Thu, 19 Aug 2010 12:48:18 
To: mysql@lists.mysql.com
Reply-To: peter.braw...@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.braw...@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.idb.id;
 union
 select a.id,b.id from tbl a join tbl b on a.idb.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=burhan.kha...@gmail.com



Re: Why is Host option Failing?

2010-07-05 Thread burhan . khalid
Michael:

  It could be that MySQL is only listening on localhost (127.0.0.1) and not 
your net IP. Check your network settings in your server config. Alternately, 
you can also do a 

netstat -anp | grep mysql

As root and see where it is listening.

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

-Original Message-
From: Michael Satterwhite mich...@weblore.com
Date: Mon, 5 Jul 2010 10:04:22 
To: Martin Clarkeclark...@gmail.com
Cc: mysql@lists.mysql.com
Subject: Re: Why is Host option Failing?

On Monday, July 05, 2010 08:26:03 am you wrote:
 Hi,
 
 dig should be in /usr/bin but its possible it isn't installed
 I'm not sure about PcLinuxOS but it's in the dnsutils package on
 debian/Ubuntu.

As you said earlier, it's not necessary to use dig to check the ip address. 
Ping does the job. 
 
 Also, after you change DB/User permissions with GRANT statements it's often
 necessary to do a 'FLUSH PRIVILEGES;'
This I didn't know.. I just tried it, though, and it makes no difference.

 
 It's also entirely possible that Photon resolves to 127.0.0.1 in which case
 you will need  GRANT for 'michael'@'localhost'
 Is the name pho

[mich...@photon ~]$ ping photon
PING photon (192.168.1.20) 56(84) bytes of data.
64 bytes from photon (192.168.1.20): icmp_seq=1 ttl=64 time=0.047 ms
64 bytes from photon (192.168.1.20): icmp_seq=2 ttl=64 time=0.045 ms


 ton listed in /etc/hosts ?
 
 Hope thats of some use
 mc
 
 On 5 July 2010 03:35, Michael Satterwhite mich...@weblore.com wrote:
  On Sunday, July 04, 2010 06:36:00 pm you wrote:
   What user are you at the time you are running these tests.  Would I be
   correct in guessing 'root'?
   
   The reason localhost works is because, in some distros, root is
   enabled localhost with no password .. which is dangerous enough..
   granting root@'% would be an invitation to disaster..
   
   From that same command line, what do you get for
   $ dig photon
   
   You likely want to make a grant suitable rfor that network address for
   the user you are trying to use.
   
- michael dykman
  
  This sounded good, but
  
  dig photon returns command not found
  
  I logged onto the server as root and issued the command:
  
  grant all privileges on *.* to 'michael'@'%' identified by ;
  (??? is the password, in quotes, of course). It responded
  
 Query OK, 0 rows affected (0.00 sec)
  
  I still can't connect via
  
 mysql -h photon -u michael -p??
  
  Still
  
  ERROR 2003 (HY000): Can't connect to MySQL server on 'photon'
  (111)
  
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/mysql?unsub=clark...@gmail.com

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