Reply to Re: SQL Query Inner joins with 3 tables

Your name:

Reply:


Posted by Hilarion on 10/20/05 18:11

> Thx Hilarion, that was exactly what I was looking for. Didn't know
> about CROSS JOIN.
>
> I really do appreciate it!


You could use INNER JOIN with some dumb "ON" clause like this:

SELECT
c.company_id,
c.company_name,
v.variable_id,
v.variable_name,
vv.variable_value
FROM
company AS c INER JOIN
variable AS v ON c.company_id = ?? LEFT OUTER JOIN
variable_value AS vv ON vv.company_id = c.company_id AND v.variable_id = vv.variable_id
ORDER BY
c.company_name,
c.company_id,
v.variable_name,
v.variable_id,
vv.variable_value


Hilarion

[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

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