snowboardr
Programmer
I have a categories table and a tutorials table, I would like to left join the tutorials to count them, I must check to see if the tutorial is in cat1 & cat2, I do realise i need a GROUP by however I still can't get it to work with a group by...
Any suggestions would be greatly appreciated.
Any suggestions would be greatly appreciated.
Code:
sql = "Select cat.cid, cat.cname, cat.ctype, tut.tcat, COUNT(tut.tsubcat) as CategoryCount "_
& "FROM categories cat LEFT join tutorials tut on tut.tcat=" & cid & " AND tut.tsubcat=cat.cid WHERE cat.ctype=3 ORDER BY cat.cname ASC"