SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Almeaty Member
    Join Date
    Jul 2000
    Location
    Nowhere
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I would like to set up a DB table which should contain the id's of another table. This info (id) are placed in just one table cell. What shall I do?

    To be more specific: there's a table called "developers". There should be info like email, name, his skills, and the id's in which this developer has participated. The project's table of course is already existing.

    So when the visitor loads this developer's page, he should get a list of projects which this corresponding developer has joined.

    Thanks for any help!

  2. #2
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What you want to use are called joins, Kevin covers them in his php/mysql article on this site.

    Chris

  3. #3
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Indeed, as soon as you find yourself trying to store multiple values in a single database table, you should re-think your database design. The relationship of developers to projects is a many-to-many relationship. Read the chapter on Relational Database Design in my article to find out how to set up a lookup table to model this relationship.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference


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
  •