Hello Hello,
Buried in mySQL syntax and query structure problems once more. I'm currently doing this query fine:-
SELECT DATE_FORMAT(`when`, '%e/%c/%Y')date
, COUNT(`ip`) AddressCount
FROM `metrics`
WHERE `projID` = '$projID'
GROUP BY DATE(`when`)
This works fine to find the specific number of ip address's hit. However, what I'm now trying to do is give an overall, for all a user's projects. But, this table doesn't contain a user's ID, the projects table does. They are linked by a 'projID'. So, what I'm asking is how I can link the two to get a result.
I.e. SELECT the bumph I want
FROM metrics
WHERE (ANOTHER TABLE's) userID
= '1' or, WHERE any projID's = ones listed in the projects table. alongside the userID.
Now, a straight forward join doesn't seem to be my answer? I'm perplexed by joins in the first place. Any help grand appreciated.