SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Mar 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mysql Database question

    I have a script I am working on that allows people to log in and manage our online store on one section I have this area where people can insert the different parts or products that go in the system my question is when I create a table it has the fields

    ram
    hardrive
    videocard
    motherboard

    and so on

    now when they ad ram I want them to be able to include price specs for it among other things and the only way I can think to be able to do this without creating a table that is four miles long is to create many tables but this will greatly increase the code I have to use to conect to the table as well as other headaches is thier a simple way to do this


    signed
    brain fried

  2. #2
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You will have to create a table like:

    Name
    Price
    Description
    Specs
    Category

    Then your categories would be:

    Ram, HardDrive, Video Card, MotherBoard.

    Your system table would then just reference a bunch of these parts...

    Systemid
    component1
    component2
    component3
    component4
    Wayne Luke
    ------------


  3. #3
    SitePoint Member
    Join Date
    Mar 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you show me this in an example I think I understand but I am not sure


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
  •