Author Topic: Best method of assigning two unique ID sets  (Read 162 times)

0 Members and 1 Guest are viewing this topic.

Offline akomazTopic starter

  • Irregular
  • Gender: Male
    • View Profile
Best method of assigning two unique ID sets
« on: March 03, 2010, 03:06:29 PM »
I'm looking for the best way to store data and allow for two sets of unique IDs. 

For instance if I had a table that contained a list of company names and individual contacts for each of those companies, both the company and the contact would have unique IDs.

This would allow for selecting a contact by its unique ID, or selecting a group of contacts by the company ID.

What is the best way to accomplish this?

Offline mapleleaf

  • Enthusiast
    • View Profile
Re: Best method of assigning two unique ID sets
« Reply #1 on: March 03, 2010, 10:42:31 PM »
two tables
company_id
company_name

contact_id
company_id
contact_name

PHP Freaks Forums

« on: »

Tired of these ads? Purchase a supporter subscription to get rid of them.