Re: Access a database on another domain

From: Date: Mon, 03 Aug 2009 02:15:05 +0000
Subject: Re: Access a database on another domain
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-46373@lists.php.net to get a copy of this message
Neil Jackson wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I host a number of running clubs websites. They are all hosted on different domains on a hosting service. They all share a common database table of fixtures. At present I have copied the database table to each domain but this time consuming. I want to have a central database with the individual clubs accessing the table from their domains At present I do it like this $result = @mysql_pconnect("localhost", "username", "password"); $query = "SELECT * FROM fixtures ORDER BY event_name";
I haven't seen a question here, but I assume you don't know where to start. Enable remote access to mysql: http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html Then connect to it: mysql_connect('server.name', 'username', 'password'); -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.db (#46373) next »