In message
<[EMAIL PROTECTED]>,
[EMAIL PROTECTED] writes
Change one of your INNER JOINS to a LEFT JOIN. (The comma separated
list of table names is actually a sneaky way to declare INNER JOINS).
That way you will see all of the _objectives records whether or not
they appear in _iso or any of the other tables.
SELECT_objectives.id,
_objectives.name,
COUNT(go._iso._objective_id)
FROM go._objectives
INNER JOIN go._subjectHeadings
ON go._subjectHeadings.id = go._objectives.subjectHeadings_id
INNER JOIN go._subjects
ON go._subjects.id = go._objectives.subjects_id
LEFT JOIN go._iso
ON go._iso._objective_id = _objectives.id
WHERE go._subjectHeadings.id = 276
AND go._subjects.id = 44
GROUP BY 1,2
ORDER BY go._objectives.displayOrder
[snip]
The group by 1,2
what is that all about the 1,2? is it join 1 and then join 2?
--
Work:- postmasterAThinwick.demon.co.uk
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]