function exif_custom_get_mid in EXIF Custom 7
Get the mapping ID from a Mapping name.
Parameters
string $name: The name of the mapping.
Return value
int The ID, or if not found -1.
2 calls to exif_custom_get_mid()
- exif_custom_export_map in ./
exif_custom.features.inc - Custom function for exporting mappings to code.
- exif_custom_import_map in ./
exif_custom.features.inc - Custom function for import mappings from code.
File
- ./
exif_custom.module, line 535 - Primary hook implementations for EXIF Custom.
Code
function exif_custom_get_mid($name) {
$mid = db_select('exif_custom_maps', 'm')
->fields('m', array(
'mid',
))
->condition('m.name', $name)
->execute()
->fetchField();
if (!empty($mid)) {
return $mid;
}
return -1;
}