PDA

View Full Version : using established database with subdomain


cme4pt
12-5-02, 01:49 PM
I am setting up an application on my site which will run in a subdomain. Can I use the same database that is on my main domain with the application in the subdomain or do I need to set up a separate database?

Thanks,
cme4pt
http://therehabspot.com

HalfaBee
12-5-02, 04:30 PM
You can use the database on your subdomain without any problems.

When it comes down to it, you can use your DB on any site you just have to put the server address in for the host.

e.g.

mysql_connect( server.powweb.com , user , password )

I would advise you to do this on your localscripts as well. There have been a few cases recently where localhost would not work for the mysql connection.

HalfaBee

cme4pt
12-5-02, 04:38 PM
I was hoping that was the case. Now I have to go to work putting it all together.

Thanks again,
cme4pt