All pastes #931464 Raw Edit

Anonymous

public php v1 · immutable
·published 2008-03-07 05:59 UTC
rendered paste body
<?php  $ntype = 'action';  $location = '81'; // taxo id of term  $status = 'In Progress';  $count = db_result(db_query("SELECT COUNT(DISTINCT(n.nid)) FROM {node} n INNER JOIN {term_node} t ON n.nid = t.nid INNER JOIN {content_type_action} a ON n.nid = a.nid WHERE n.type='%s' AND t.tid='%s' AND a.field_status_value='%s'", $ntype, $location, $status));  echo $count;?>