You are here

function getlocations_get_vid in Get Locations 6

Same name and namespace in other branches
  1. 6.2 getlocations.module \getlocations_get_vid()
  2. 7.2 getlocations.module \getlocations_get_vid()
  3. 7 getlocations.module \getlocations_get_vid()

Function to get the vid from node table.

Parameters

int $nid:

Return value

Returns vid.

3 calls to getlocations_get_vid()
getlocations_nids in ./getlocations.module
Menu callback
getlocations_nodemap in ./getlocations.module
Menu callback
getlocations_typemap in ./getlocations.module
Menu callback

File

./getlocations.module, line 803
Displays locations on a map. for Drupal 6 using version 3 googlemaps API

Code

function getlocations_get_vid($nid) {
  $result = db_query('SELECT vid FROM {node} WHERE nid=%d', array(
    $nid,
  ));
  $row = db_fetch_array($result);
  return isset($row['vid']) && $row['vid'] ? $row['vid'] : FALSE;
}