You are here: Re: SQL Query Inner joins with 3 tables « PHP SQL « IT news, forums, messages
Re: SQL Query Inner joins with 3 tables

Posted by Hilarion on 10/20/05 21:14

>>>> Thx Hilarion, that was exactly what I was looking for. Didn't know
>>>> about CROSS JOIN.
>>>>
>>>> I really do appreciate it!
>>>>
>>> Hilarion's query gives what you want? I'm not sure at all, since you
>>> et variables for a company that do not belong to it. Does this make
>>> sense?
>>> Well its up to you.
>>
>>
>>
>> As I understand DonJ's structure the variables (in general) never belong
>> to any company. It's only a set of possible company "parameters". A company
>> can have some of those parameters set to some values (then entries
>> "variable_value" tables appear for those) and some of those "parameters"
>> can remain unset (then there's no entry in that table).
>> DonJ apparently wanted to list all possible "parameters" for specified
>> company (or all companies) even if they are not specified for that company.
>> This means selecting a company (or more than one), selecting all
>> "parameters"
>> (called "variables") and left-joining it with available values of those
>> "parameters" for this company (or companies).
>
> Oh thanks Hilarion for that explanation

No problem.


> (btw. I know how to achieve this behaviour ;) )

I suppose so. The explanation was rather for DonJ.


> but it doesn't make that much sense to me.

I see a point in this. If you want to give your client a way to enter
some optional details about his company and you want him to stick
to some predefined parameters, then this structure is ok.
The query gives some info on what parameters who used and with
which values.


Hilarion

 

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

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