"Steve Fitzgerald" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> What is the best method for avoiding multiple ids for the same
information.
>
> For example: I have a table name company that has unique ids. The
CompanyID
> are tied to a table name contacts which have unique ids (ContactID). The
> problem seems to be that if I add a contact with an existing CompanyName
> then I will get multiple ids for the same CompanyName.

When inserting a new contact, do a search for the company name. If it
exists,
use the existing id; otherwise, create a new company and get the new id.




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to