|
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 :)
Navigation:
[Reply to this message]
|