Generate hyperlink on each row for html table that contains database data
If you have custom code that generates the table then it should be easy to output the link to files as well.

I assume you are looking for info on how to get the link to the file having your file id from the database.

You will need this:
Given a File ID (fid) how can I get the HTML that represents that fid?

EDIT: 
After you provided some sample code I was able to figure out what you need:

You need a slash in front of drupal. 

&lt;a href=\"/drupal/sites/default/files/" . $data-&gt;FileName . "\"&gt;