Skip to content

Instantly share code, notes, and snippets.

@gwixted
Created April 24, 2013 20:55
Show Gist options
  • Save gwixted/5455492 to your computer and use it in GitHub Desktop.
Save gwixted/5455492 to your computer and use it in GitHub Desktop.
Drupal Taxonomy Children Selection Rule
$rst = db_query('SELECT tid FROM taxonomy_term_hierarchy WHERE parent = :tid', array(':tid'=>arg(2)));
$result = $rst->rowCount();
if($result > 0){
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment