Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.
Sedo.com

Wanted: Service Multiple Sites connected to 1 Db

Status
Not open for further replies.

ivdnet

Level 5
Legacy Platinum Member
Joined
Jul 2, 2005
Messages
366
Reaction score
0
hello everybody,

I got a website that advertises, free of charge, properties for sale and for rent worldwide.

As I got many other domains, all Real Estate related, I was looking to have various sites but all using the same SQL Db so that there are more entrances to the same products. I want the domains to be unique but the Db to be the same. I do not like the iframe functions. Is there any way to do it?

Thanks!

luigi
 

Theo

Account Terminated
Joined
Feb 28, 2004
Messages
30,317
Reaction score
2,217
Do you have a current database? Is the site hosted somewhere? You can allow remote database connections from specific hosts - it's relatively easy to do if you're using CPanel.
 

mmkrulz

Level 8
Legacy Exclusive Member
Joined
Oct 23, 2004
Messages
1,062
Reaction score
0
I suggest multiple databases connected to each other, whenever one is updated, so are teh others (via cronjobs), this way, if one goes down, others will still be up, and yet you will have the flexibility of sharing information in between them. (i am not an expert in cron jobs, so u will have to find someone to do the job for that, or do it yourself if you know how)
 

BillyParadise

Level 1
Legacy Platinum Member
Joined
Feb 22, 2005
Messages
19
Reaction score
0
mmkrulz said:
I suggest multiple databases connected to each other, whenever one is updated, so are teh others (via cronjobs), this way, if one goes down, others will still be up, and yet you will have the flexibility of sharing information in between them. (i am not an expert in cron jobs, so u will have to find someone to do the job for that, or do it yourself if you know how)


I think you're talking about replication. Can be a pain to set up, but marvelous when it runs correctly. Also great for running a live backup of your database.

However if the original poster is running a custom database app, as opposed to a pre-made script, it's trivial to "reskin" a database. If you're concerned about reliability, certainly replicate across two servers, hopefully each running RAID 1 or better. But for ease of use, multiple sites pulling data from the same DB is IMHO the way to go.

Your SQL statements stay the same or similar -

SELECT * FROM property_table WHERE location = "trinidad"

you just change the html around it. Perhaps you give more info at one site, put the number of bedrooms in front of the number of bathrooms on another... not a difficult task for anyone who does SQL.

Hope that helps

BP
 

ivdnet

Level 5
Legacy Platinum Member
Joined
Jul 2, 2005
Messages
366
Reaction score
0
RADiSTAR said:
Do you have a current database? Is the site hosted somewhere? You can allow remote database connections from specific hosts - it's relatively easy to do if you're using CPanel.

Yes RAdistar,

the site is hosted and I use Cpanel.

I will write to my host and I will ask them how to do.


mmkrulz. I tried before that but everything could go possibly worng went wrong...

Thanks to all of you! Very helpful!
 

Theo

Account Terminated
Joined
Feb 28, 2004
Messages
30,317
Reaction score
2,217
It's fairly easy.

Go to your CPanel. Then under Databases click on MySQL Databases.

Once there, scroll down to Access Hosts.
It should currently say "localhost", meaning only the domain that hosts the database is allowed to access it.
Add your other domains that need to access the database. To be sure, enter them both with and without the "www"
Now, the code that would address the database needs to be written by you :-D
 

ivdnet

Level 5
Legacy Platinum Member
Joined
Jul 2, 2005
Messages
366
Reaction score
0
RADiSTAR said:
It's fairly easy.

Go to your CPanel. Then under Databases click on MySQL Databases.

Once there, scroll down to Access Hosts.
It should currently say "localhost", meaning only the domain that hosts the database is allowed to access it.
Add your other domains that need to access the database. To be sure, enter them both with and without the "www"
Now, the code that would address the database needs to be written by you :-D

Thanks a lot! Got it clear now!

Will go for it.

Cheers!
 

Theo

Account Terminated
Joined
Feb 28, 2004
Messages
30,317
Reaction score
2,217
NP, glad to help.
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members Online

Sedo - it.com Premiums

IT.com

Premium Members

MariaBuy

New Threads

Our Mods' Businesses

UrlPick.com

*the exceptional businesses of our esteemed moderators

Top Bottom