Commit bba2d085 authored by aaronwinborn's avatar aaronwinborn

documentation for media_metadata_by_fid

parent 1115549c
......@@ -104,6 +104,7 @@ function media_metadata_form_submit($form, &$form_state) {
* following values:
* ->mid, the unique serial ID for the record;
* ->fid, the associated File ID for the metadata;
* ->filemime, the associated MIMEtype for the associated File;
* ->name, the metadata key; and,
* ->data, the metadata value.
*
......@@ -119,7 +120,7 @@ function media_metadata_form_submit($form, &$form_state) {
*/
function media_metadata_by_fid($fid, $unhandled = FALSE) {
$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,
));
foreach ($result as $record) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment