SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard holmescreek's Avatar
    Join Date
    Mar 2001
    Location
    Northwest Florida
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I've read Kevins article on PHP & MySql database driven sites and get the idea. From the examples the data is stored into a single database with multiple tables. Maybe someone can help answer a basic question:

    Is it typical to use multiple MySql databases on a site? Its sounds silly, but most tutorials etc only discuss the use on one database. For example, a site I'm building would have an admin database that keeps info on staff writers in one table that links to another table with their articles. For the site, I considered using a seperate database for the message forums, mailing address etc, posted by site guests that register. Basically what I'm doing is a site with news articles that are posted by authors, a public message forum and will implement an e-commerce system into the site later. I've built several e-commerce sites using Perl but moving into PHP and trying to get an overview of how to put the pieces together, not necessarly the coding aspects.

    The other thing I was wondering. I requested that my hosting service set up a mysql database named "users." If I create a datbase called "users" on my testing machine for development can I somehow upload my database to overwrite the one on their server? I'm unclear of how the process works. Again, basic questions.

    Thanks!

  2. #2
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Personaly, I would design the site to keep the message forums as autonomous as possible from the rest of the site. This would include them having their own database. Thus if in future you need to move the forums to a different server (because they are so popular they need a server of their own), this is easier to do. However, if your host only allows one database per account you have no choice.

    You will be able to dump your local copy of the database and load it into the remote one. I use phpMyAdmin from www.phpwizard.net for this. There have been discussions in this forum about how to do this manually however. You can do a search on "mysql dump" and you will get a few relevent results.

  3. #3
    SitePoint Wizard holmescreek's Avatar
    Join Date
    Mar 2001
    Location
    Northwest Florida
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using seperate servers & session questions

    First, thanks for the information, Freakysid. It does make more sense to split up into multiple databases. You gave me some ideas.

    Typically I'm use to designing a site with one specific tracking function such as using cookies to track shopping cart contents.

    I am considering setting up a forums.domain.com and a shop.domain.com along with the domain.com using DIR aliasing. I figure I would use two databases. A content database an author and a articles. Second, I would use a member database for profiles of visitors to the site.

    I want to avoid is having the user have to sign up for two userids, one for the forums section and one for the shopping section. And I also want to avoid requiring a user to sign up for a user id before they can purchase anything. Figuring out how to seperate things I want to keep track up, but keeping the userid more like a site "passport" is what I'm working on. Maybe put all this into a single database -- have a Y/N field to toggle if they go to the forums and accept the agreement and have the name - address - city fields that could be filled in if they alread have a user id then switch to the shopping site. So, if they sign up on the 1st for forums then the id is created -- later when they hit the shopping section it uses their exisint user id but then prompts for the address info to stick in the database and vice versa.

    Any suggestions of mixing up site contents like this would be very much appreciated!

    - I think I'm thinking too hard.

  4. #4
    SitePoint Wizard holmescreek's Avatar
    Join Date
    Mar 2001
    Location
    Northwest Florida
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sessions Across Servers

    Oh, one thing I forgot to included in my previous post/question. Lets assume that I split the site up into domain.com, forums.domain.com, and shop.domain.com. If I use a startsession() in the scripts, as the user moves across each domain each domain should start a unique session number. But, if I do this wouldn't it require the user to login 3 times?


    Um, I think I have utterly confused myself really good now.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •