You are here: Re: Join with many parts into only 1 request « PHP SQL « IT news, forums, messages
Re: Join with many parts into only 1 request

Posted by Tom Peel on 10/13/37 11:40

leupat wrote:
> Hello everybody !!
>
> I have a little problem with request.
>
> I have 2 tables like that :
>
> Table 1: T_Product
> IdProduct
> ProductName
> IdSupplierPart1
> IdSupplierPart2
> IdSupplierPart3
> ...
> IdSupplier10
>
> Table 2: T_Supplier
> IdSupplier
> SupplierName
> Adress
> ...
>
> For one product we can have many supplier.
>
> How to received its name(ProductName) and names of each suppliers
> (SupplierName) for 1 product into only 1 request ??
>
> Thanks
> Best regards.

This is a classic example of a non-normalized table, and SQL will not
handle this well for very good reasons. Remove IdSupplierPart1 etc from
T_Product and create an additional table linking Supplier to Product.

T.

 

Navigation:

[Reply to this 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

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