You are here

function webfm_get_fid in Web File Manager 5

Same name and namespace in other branches
  1. 5.2 webfm.module \webfm_get_fid()

Given a file path this function returns fid from the webfm file table

Parameters

string $path:

Return value

int $fid if one exists or FALSE if none was found

2 calls to webfm_get_fid()
webfm_insert_file in ./webfm_file.inc
webfm_insert_file - inserts a file into the webfm_file table
webfm_rename_db_file in ./webfm_file.inc

File

./webfm.module, line 2790

Code

function webfm_get_fid($path) {
  $query = "SELECT fid FROM {webfm_file} WHERE fpath = '%s'";
  $result = db_query($query, $path);
  if ($result !== FALSE) {
    if ($row = db_fetch_object($result)) {
      return $row->fid;
    }
  }
  return FALSE;
}