function node_tools_get_number_of_revisions in Module Grants 6.4
Same name and namespace in other branches
- 6.3 node_tools/node_tools.module \node_tools_get_number_of_revisions()
Get the number of revisions belonging to a node.
Parameters
$nid, id of the node:
Return value
A count representing the number of revisions associated with the node
2 calls to node_tools_get_number_of_revisions()
- node_tools_form_alter in node_tools/
node_tools.module - Implementation of hook_form_alter().
- node_tools_nodeapi in node_tools/
node_tools.module - Implementation of hook_nodeapi().
File
- node_tools/
node_tools.module, line 39 - Generic reusable functions involving node objects.
Code
function node_tools_get_number_of_revisions($nid) {
return db_result(db_query("SELECT COUNT(vid) FROM {node_revisions} WHERE nid=%d", $nid));
}