function image_hotspots_db_update in Image Hotspots 7.2
Update hotspot data in database.
Parameters
int $fid: File id.
string $language: Language.
string $data: Information about hotspots (JSON).
1 call to image_hotspots_db_update()
- image_hotspots_node_submit in ./
image_hotspots.module - Implements hook_node_submit().
File
- includes/
image_hotspots.db.inc, line 40 - Functions for database interactions.
Code
function image_hotspots_db_update($fid, $language, $data) {
if (empty($data)) {
return;
}
$fields = array(
'fid' => $fid,
'language' => $language,
'coordinates' => $data,
);
drupal_write_record('image_hotspot', $fields, array(
'fid',
'language',
));
}