You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 52 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Multiple sites off one MySql database (single table str) [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
ssjones
Nuke Cadet
Nuke Cadet


Joined: Aug 11, 2005
Posts: 3


PostPosted: Fri Aug 19, 2005 12:22 pm Reply with quoteBack to top

I'm currently looking to host multiple sites off one MySql database. Eventually I'd like to see hundreds of sites running off one database. Because I'm looking at such a large number of sites I don't think duplicating the tables within the database would work well.

Has anyone done this yet? I've found references that version 5 of PHP-Nuke would provide this type of functionality but I haven't been able to find anything concrete.

My current line of thought is to create site ID tables within the database. All page data would have to refer to a site ID.

I'm assuming that all modules and blocks would also have to be adjusted to incorporate the site ID.

If anyone has attempted anything like this I'd love to hear from you.
Find all posts by ssjonesView user's profileSend private message
WD-40
Lieutenant
Lieutenant


Joined: Dec 02, 2004
Posts: 231


PostPosted: Fri Aug 19, 2005 2:02 pm Reply with quoteBack to top

I believe most people have done or tried this. There's really nothing special in this case either. It's all configured via use of your config.php file.


Sincerley -
Find all posts by WD-40View user's profileSend private messageVisit poster's website
ssjones
Nuke Cadet
Nuke Cadet


Joined: Aug 11, 2005
Posts: 3


PostPosted: Sat Aug 20, 2005 11:53 am Reply with quoteBack to top

Is there a way to do this without altering the sql statements within the different php files?

You mention it can all be done in the config.php. I'm not sure how this would be done without changing the code within the different modules. If you could elaborate a bit I'd much appreciate it.

Thanks
Find all posts by ssjonesView user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12397


PostPosted: Mon Aug 22, 2005 8:38 pm Reply with quoteBack to top

You just need the NukeSQL script to create tables with a specific prefix. And then use config.php to load whichever prefix you want.

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
ssjones
Nuke Cadet
Nuke Cadet


Joined: Aug 11, 2005
Posts: 3


PostPosted: Tue Aug 23, 2005 5:13 pm Reply with quoteBack to top

ok..I don't think I'm explaining myself very well Smile

If I were to have 100s of sites hosted off one database, and use different prefixes for the database tables in each site.....then I would end up with thousands of tables in my database. My assumption (someone please correct me if I'm wrong) is that MySQL will blow up if I have thousands of tables. Is this a correct assumption?

Based on the above assumption I concluded that I would have to modify the tables within the database (single prefix on the tables) to include a site ID and manage the data with a single database and a single prefix.

If MySQL can handle 1000s or 10,000+ tables then I could just use prefixes to solve the problem and it would save alot of headache.

Will MySql support such a large amount of tables?

edit:
Having thousands of tables really isn't feasible to manage...so I'm really looking to use one DB and a single table structure for the sites.
Find all posts by ssjonesView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.256 Seconds - 304 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::