first of all, you should really learn to use line breaks and indentation to make your sql more readable...
Code:
SELECT DISTINCT jcat.title
, jcon.state
, jcat.alias as jalias
, COUNT(catid) as count
FROM jos_content as jcon
RIGHT
JOIN jos_categories as jcat
ON jcon.catid = jcat.id
WHERE jcat.id > 6
AND jcat.published = 1
AND jcon.state = 1
OR jcon.state is null
AND jcat.id > 6
AND jcat.published = 1
GROUP
BY jcat.id
now, i might quibble about a number of things in your query, but it should still work
can you describe what is wrong with this query?
Bookmarks