SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict itsource's Avatar
    Join Date
    Jun 2001
    Location
    Thailand
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    join 2 table from 2 database

    Please answer me please?
    1. If I have 2 database, webboard and member

    webboard database has table that store question and answer
    member database has table that store member profile

    if i want to query, What question that user A post on webboard? How can I query it?

    2. In member database I have 2 table,
    member_profile and member_password
    In member_profile table keep all profile of member.
    In member_password table keep only username and password.

    I use login name(varchar) to link between two table(not integer). Is I do it correct? Has any comment?

    3. If I have a form that has 4 text field.
    username, password, name, nickname.
    When I click add button. I want username, password to store in member_password table and name, nickname store in member_profile table. How can I write sql?

    Note. member_profile has many field so I separate from member_password.

  2. #2
    SitePoint Evangelist CyberFuture's Avatar
    Join Date
    May 2001
    Location
    San Diego, CA
    Posts
    434
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a reason why you have two databases?

    I aslo think you could combine the two tables in your members database.

  3. #3
    SitePoint Addict itsource's Avatar
    Join Date
    Jun 2001
    Location
    Thailand
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have many database because I think member data and webboard data has different. Not only these database I think I shoud have other database because data is different such as article database, file database.

    Is I think correct? Is these information should in one database or many database. If all of these in one database, it has many table, I think it complicate.

    Any one has comment? How to store database?

  4. #4
    Victory shall be mine tubedogg's Avatar
    Join Date
    Mar 2001
    Location
    Medina, OH
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I agree with CyberFuture - you could combine the two tables in your members' database. For each type of data, such as article data, file data, etc., have a different table (or multiple tables). You could do multiple tables with an addition at the beginning like
    article_xxxtablename
    if there are multiple tables for each type of data. It would certainly make it much easier to work with if it wasn't across databases.
    Kevin


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
  •