You can do it many ways, you should be able to get all the data you need in one query, assuming the image has its src, link, alt and title in the same row.
So, you'd query the db.
$myArray = mysql_query("SELECT * FROM Blah WHERE Blah = '$blah' LIMIT 1");
fetch the array.
$myRow = mysql_fetch_array($myArray);
assign the variables.
$link = $myRow['link'];
$src = $myRow['src'];
etc.
Then, in the html part, you can simply open up a php snippet where needed.
e.g.
<a href="<?php echo $link; ?>"> Link Here </a>
Using the same method for the other fields.
Hope that helps.