function webfm_get_fid in Web File Manager 5.2
Same name and namespace in other branches
- 5 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_dir in ./
webfm_file.inc - webfm_insert_dir - inserts files into the webfm_file table
- webfm_rename_db_file in ./
webfm_file.inc
File
- ./
webfm.module, line 2038
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;
}