Friday, June 15, 2012

Get single field value from a table in drupal7


<?php

$filename = db_query("SELECT uri from file_managed where fid=:fid", array(':fid' => arg(3)))->fetchField();

echo $filename;

?>

No comments:

Post a Comment