List of leaf terms without images


$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) ORDER BY tid ASC;");

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

while($row = db_fetch_array($results)){
$rows[] = array(l($row['tid'], 'taxonomy/term/'.$row['tid']), $row['name']);
echo 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