+ Reply to Thread
Results 1 to 7 of 7

 

Thread: PHP question......again :)

  1. #1
    uklejon's Avatar
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Shropshire
    Posts
    840
    Thanks
    0
    Thanked 1 Time in 1 Post


    Another new site being designed and this time its using PHP and not ASP.......thought i'd have a go at what most here seem to be using.

    This is probably a really silly question but........with a MySQL database....is there just the one? I'm setting up 3 custom made scripts which all use MySQL so do i use the same one for all scripts......ie the same password details etc for each script.

    In ASP you tend to have separate databases for spearate applications unless you want to combine them somehow!!!

    Told you it was a silly question

    Thanks

    Carol

  2. #2
    thin[box]king

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Cambridge
    Posts
    1,905
    Thanks
    13
    Thanked 12 Times in 12 Posts
    It depends what your hosting lets you have, if you are alloud more than 1 db then you will have to set them up via your control panel.
    Follow Me | Looking for Merchants Who Do Scifi Stuff

  3. #3
    Avoiding real work

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Buckinghamshire
    Posts
    1,373
    Thanks
    0
    Thanked 0 Times in 0 Posts
    For a start it'll depend on how many MySQL databases your host have given you.

    I tend to keep all the stuff for a single site in one database as it makes keeping track of connections a lot easier, but I can't see any reason why you shouldn't split them into separate datebases if you wanted to.
    Those who can do, those who can't talk about it

  4. #4
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Posts
    2,448
    Thanks
    0
    Thanked 0 Times in 0 Posts
    A MySQL server can host multiple databases, but some hosts only let you have one database. If your stuck with a host that only lets you have one database, the easiest thing to do is use prefixes on the table names to keep them logical - e.g. guestbook_message, phpads_blar, etc.

    Edit: (Sir, I didn't copy his answer, sir, I promise, sir). Agree with ianm, one database per site does help keep things simple.
    Last edited by Rich; 11-05-04 at 05:13 PM.

  5. #5
    uklejon's Avatar
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Shropshire
    Posts
    840
    Thanks
    0
    Thanked 1 Time in 1 Post
    Thanks Guys,

    So when these individual scripts write the tables to the database they won't overwrite the exisiting tables already there.


    Is that right ?

    Carol

  6. #6
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Posts
    2,448
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Most scripts force you to create the database first, so they should be ok. Just watch out for two scripts wanting to use the same table name.

  7. #7
    uklejon's Avatar
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Shropshire
    Posts
    840
    Thanks
    0
    Thanked 1 Time in 1 Post
    Wonderful....thank you

    Carol

+ Reply to Thread


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PHP redirect question
    By drivetowin in forum Programming
    Replies: 1
    Last Post: 31-12-04, 04:44 PM
  2. PHP question
    By matbennett in forum Programming
    Replies: 1
    Last Post: 19-11-04, 07:13 PM
  3. Shopping Channel / PHP Question.
    By draytop in forum Affiliate Window & buy.at
    Replies: 0
    Last Post: 09-08-04, 04:05 PM
  4. Question about @ prefix in php
    By darrenw in forum Programming
    Replies: 2
    Last Post: 28-03-04, 05:40 PM

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
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2