Reply to Re: multiple joins

Your name:

Reply:


Posted by Geradeaus on 01/09/06 11:47

"J.O. Aho" <user@example.net> schreef in bericht
news:4276klF1h8tplU1@individual.net...
> Geradeaus wrote:
>> Hello,
>>
>> I have a problem with the following, first let me explain the database
>> situation :
>>
>> SELECT region.regionName, COUNT( addate.regionId ) AS Total
>> FROM region
>> LEFT JOIN addate ON (addate.regionId = region.regionId AND addate.level =
>> 1)
>> JOIN ad ON (addate.adId = ad.adId AND ad.adTypeId = 4)
>> GROUP BY addate.regionId
>
> SELECT region.regionName, COUNT( addate.regionId ) AS Total FROM region
> LEFT
> JOIN addate ON (addate.regionId = region.regionId) JOIN ad ON (addate.adId
> =
> ad.adId) WHERE ad.adTypeId = 4 GROUP BY addate.regionId
>
> You can't have "OPTIONS" in your joins, those you have to place in your
> WHERE.
> http://dev.mysql.com/doc/refman/5.0/en/join.html
>
>
> //Aho

Thx for the advice :)

[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

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