I have a category system that is related many-to-many with posts. How can I select a list of those categories that are related to one or more posts?
$q = Doctrine_Query::create()
->from('Category c')
->where('<DONT KNOW WHAT TO WRITE>')
->select('c.name');