Revision of List of leaf terms without images from Mon, 2009-01-26 17:04

<?php

$results = db_query("SELECT name,tid FROM term_data WHERE vid = 32 AND tid NOT IN (SELECT t.tid FROM term_node t,node n WHERE n.nid = t.nid AND n.type = 'image') AND tid NOT IN (SELECT parent FROM term_hierarchy);");

$headers = array('TID', 'Name');
$rows = array();

while($row = db_fetch_array($results)){
$rows[] = array($row['tid'], $row['name']);
}
print_r($rows);
theme('table',$headers, $rows);
?>

Mon, 2009-01-26 17:02 -- Anonymous (not verified)
Scratchpads developed and conceived by (alphabetical): Ed Baker, Katherine Bouton Alice Heaton Dimitris Koureas, Laurence Livermore, Dave Roberts, Simon Rycroft, Ben Scott, Vince Smith