Skip to content
Snippets Groups Projects
Commit bba2d085 authored by aaronwinborn's avatar aaronwinborn
Browse files

documentation for media_metadata_by_fid

parent 1115549c
No related branches found
No related tags found
No related merge requests found
...@@ -104,6 +104,7 @@ function media_metadata_form_submit($form, &$form_state) { ...@@ -104,6 +104,7 @@ function media_metadata_form_submit($form, &$form_state) {
* following values: * following values:
* ->mid, the unique serial ID for the record; * ->mid, the unique serial ID for the record;
* ->fid, the associated File ID for the metadata; * ->fid, the associated File ID for the metadata;
* ->filemime, the associated MIMEtype for the associated File;
* ->name, the metadata key; and, * ->name, the metadata key; and,
* ->data, the metadata value. * ->data, the metadata value.
* *
...@@ -119,7 +120,7 @@ function media_metadata_form_submit($form, &$form_state) { ...@@ -119,7 +120,7 @@ function media_metadata_form_submit($form, &$form_state) {
*/ */
function media_metadata_by_fid($fid, $unhandled = FALSE) { function media_metadata_by_fid($fid, $unhandled = FALSE) {
$metadata = array(); $metadata = array();
$result = db_query("SELECT m.mid, m.fid, m.name, m.data, f.filemime FROM {media_metadata} m INNER JOIN {file} f ON f.fid = m.fid WHERE m.fid = :fid", array( $result = db_query("SELECT m.mid, m.fid, f.filemime, m.name, m.data FROM {media_metadata} m INNER JOIN {file} f ON f.fid = m.fid WHERE m.fid = :fid", array(
':fid' => $fid, ':fid' => $fid,
)); ));
foreach ($result as $record) { foreach ($result as $record) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment