You are here

function getdirections_get_vid in Get Directions 6.2

Same name and namespace in other branches
  1. 7.3 getdirections.module \getdirections_get_vid()
  2. 7.2 getdirections.module \getdirections_get_vid()

Function to get the vid from node table.

Parameters

int $nid:

Return value

Returns vid.

5 calls to getdirections_get_vid()
getdirections_n2u_setlocation in ./getdirections.module
Function to setup the map
getdirections_setlocation in ./getdirections.module
Function to setup the map and form
getdirections_setlocations in ./getdirections.module
Function to setup the map
getdirections_setlocations_via in ./getdirections.module
Function to setup the map to display waypoints
getdirections_u2n_setlocation in ./getdirections.module
Function to setup the map and form

File

./getdirections.module, line 1308
Fetches google map directions.

Code

function getdirections_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;
}