fiddler80 Posted December 30, 2009 Share Posted December 30, 2009 Maybe I've bitten off more than I can chew here, but I've set up - successfully - a couple of smaller databases so didn't think this project would be too difficult. I have some data I need to call up from an external database that is going to be shared across something like 40 different websites. Each website has its own cms setup, so I need to create the scripts to call the data for each site. I was thinking I could simply upload the scripts to each site and only need to change the info in the database (MySQL) and it would be reflected accordingly across all websites. What I have are 12 categories. Each category has a number of "products" - with about 268 unique products in all, and some products are in more than one category. I'm figuring each category is a "web page" consisting of the php script that would display all the products in a-b-c order. For each product display on the category page there would be: Product name, product logo, product description teaser, then a "read more" link that would - when clicked - call up the complete description of that product as a page by itself. On the "product page" there would also be a contact form displayed at the end of the product description. And of course each website would have its own unique template design, so the pages would all look like they were part of the individual websites. At first I thought I could do this, but the more I think about all of this, the more confused I get on how to set the tables to call up the data. Should I make 12 individual tables and add the products to each table? What about the "read more" link - can someone point me to some tutorial about setting that up? Thanks for your time. Quote Link to comment https://forums.phpfreaks.com/topic/186745-setting-up-tables-need-help/ Share on other sites More sharing options...
JustLikeIcarus Posted December 31, 2009 Share Posted December 31, 2009 This really isnt the best way to perform what you are wanting. Since the products belong to different sites they should at the very least be seperated logically (google virtual private databases) You want to avoid accidently giving one site access to anothers products. You could do something like provide a "feed" from the server with the actual database which the end server reads in to get its list of products. Each site would access a feed of only its data. Think of how rss feeds work. This would eliminate the need to have a remote server querying your database. Quote Link to comment https://forums.phpfreaks.com/topic/186745-setting-up-tables-need-help/#findComment-986250 Share on other sites More sharing options...
fiddler80 Posted December 31, 2009 Author Share Posted December 31, 2009 Thanks for the reply, JustLikeIcarus, but I believe you misunderstand what is trying to be accomplished here - and I'm certain that is my fault for not explaining properly. While there are to be upwards of 40 individual websites - the content on all those sites, with the exception of some personal pages like "About Us" will be identical. All the sites are selling the exact same products so the product names, images, and descriptions will all be identical. There would be no "accidently giving one site access to anothers products," since each site would have the same info. The client who has requested this setup is not concerned with a Google slap for duplicate info, btw. As for the contact form - that needs to be individualized on every site, so cannot be part of the product database, yet it has to appear at the end of each product page - so I'm thinking the only way this can be accomplished is to display the products via iframe. But then I have the problem that the client wants the category pages (listing each product with a teaser and link to the product page) in a 3 col. template, but the product pages themselves in a 2 col. template. And since each individual site will have its own individual templates, how do I accomplish that? I'm not sure I understand your suggestion: "You could do something like provide a "feed" from the server with the actual database which the end server reads in to get its list of products. Each site would access a feed of only its data. Think of how rss feeds work. This would eliminate the need to have a remote server querying your database." - since all the sites (and databases) reside on the same server already, there wouldn't be a remote server making a query. If I just set up each site individually as a stand-alone, and include/edit the products in each site's cms database, then every time a product is added to a category, then I'd have to access all 40 sites to update the info. That's what I'm trying to avoid with the key database holding the categories and products info. Maybe I'm too much a noob to be doing this. Maybe this is a project for Drupal (something else I'm just learning). Appreciate your time on this. Quote Link to comment https://forums.phpfreaks.com/topic/186745-setting-up-tables-need-help/#findComment-986416 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.