function getdirections_get_nid in Get Directions 7.2
Same name and namespace in other branches
- 7.3 getdirections.module \getdirections_get_nid()
1 call to getdirections_get_nid()
File
- ./
getdirections.module, line 1470 - Fetches google map directions.
Code
function getdirections_get_nid($vid) {
if (is_numeric($vid) && $vid) {
$query = db_select('node', 'n')
->fields('n', array(
'nid',
))
->condition('n.vid', $vid);
$row = $query
->execute()
->fetchAssoc();
return isset($row['nid']) && $row['nid'] ? $row['nid'] : FALSE;
}
return FALSE;
}