Call Meta Value form database

global $post;

$newpostid = $post->ID;

$query = mysql_query(“select * from wp_postmeta where post_id = ‘”.$newpostid.”‘ and meta_key = ‘second_img'”);

while($row = mysql_fetch_array($query))          {

//echo $row[‘meta_value’];

$src = $row[‘meta_value’];