function _nodehierarchy_get_children_count_plid in Node Hierarchy 6.3
Same name and namespace in other branches
- 6.2 nodehierarchy.module \_nodehierarchy_get_children_count_plid()
- 7.2 nodehierarchy.module \_nodehierarchy_get_children_count_plid()
Count the children of the given menu link.
2 calls to _nodehierarchy_get_children_count_plid()
- _nodehierarchy_get_children_count in ./
nodehierarchy.module - Count the children of the given node.
- _nodehierarchy_save_node in ./
nodehierarchy.module - Do the actual insertion or update. No permissions checking is done here.
File
- ./
nodehierarchy.module, line 1252 - A module to make nodes hierarchical.
Code
function _nodehierarchy_get_children_count_plid($plid) {
if ($plid) {
$out = db_fetch_array(db_query("SELECT count(mlid) as children_count FROM {menu_links} WHERE module = 'nodehierarchy' AND plid = %d AND router_path = 'node/%'", $plid));
return @$out['children_count'];
}
return 0;
}