By Ceb on
I have been digging around for an hour or two now, and found many things, but haven't been able to piece it together.
Could somebody help me with the php to get a count of nodes with two terms.
i.e. I have 5 business pages with the terms 'computers' and 'city' associated to them. How do I count them?
Comments
if you do it the PHP way
If you want it the PHP way:
where 1 should be replaced with the term id of the city and 3 with computers
cheers
Part way to solution
Well, I walked away for a minute a lot of struggling and I decided to try something else.
It seems to have worked. But there's another part of this problem.
tid 7 is parented by tid 6, however if I query 6&101 get 0 results.
Drupal Way
http://api.drupal.org/api/function/taxonomy_term_count_nodes
Thank you! That was the
Thank you! That was the perfect link that made my life a lot easier.