Reply to Re: linking id fields between tables

Your name:

Reply:


Posted by NC on 09/21/05 23:56

google@charliefortune.com wrote:
>
> > > My 'products' table has an auto-incrementing id for each record,
> > > other fields, and a 'merchant' field.
>
> > In other words, you decided not to use merchant's product numbering
> > system? Is this wise?
>
> do I not run the risk of having duplicate numbers as product_id ?
> It is a primary key.

My point exactly: why do you need an auto-incrementing primary key?
In your case, it is probably a better idea to have a primary key
composed of merchant ID and merchant-assigned product ID.

> Is there a way of using the value of one field in a table to generate
> the contents of another field in a seperate table ? Like in Excel ?

Yes. It's called joining:

http://dev.mysql.com/doc/mysql/en/join.html

Cheers,
NC

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация