function contentanalysis_get_aid_by_nid in Content Analysis 8
Same name and namespace in other branches
- 6 contentanalysis.module \contentanalysis_get_aid_by_nid()
- 7 contentanalysis.module \contentanalysis_get_aid_by_nid()
Returns the aid for a given node id
Parameters
$nid: node id for the node of the analysis
Return value
aid
1 call to contentanalysis_get_aid_by_nid()
- contentanalysis_node_delete in ./
contentanalysis.module - Implements hook_node_delete().
File
- ./
contentanalysis.module, line 1724
Code
function contentanalysis_get_aid_by_nid($nid) {
$query = db_select('contentanalysis', 'ca')
->fields('ca', array(
'aid',
))
->condition('nid', $nid, '=');
return (int) $query
->execute()
->fetchField();
}