Perhaps what would best serve you is a search & explode function?
How are you separating the filenames in the database? Are they by '.' or '/' or ' ' or '-' or what? Once you know that, you can use the explode() function and call it from an array like so:
list($id,$filenames) = $row;
$file = explode(".", $filenames);
echo '<tr>
<td width="30%">' . $file[0] . '</td>
<td width="40%">' . $file[1] . '</td>
<td width="30%">' . $file[2] . '</td>
</tr>';
You could even do it like this:
<table width="100%" border="1" cellspacing="0" >
<?
// prepare the query string
$query = "SELECT id, filenames ".
"FROM uploads ORDER BY id DESC ";
$result = mysql_query($query) or die('Error, query failed [$query]');
while($row = mysql_fetch_array($result))
{
$data = $row['filenames'];
$data2 = $row['id'];
list($filename1, $filename2, $filename3) = explode(".", $data);
list($file_id_1, $file_id_2, $file_id_3) = explode(".", $data2);
echo '<tr>
<td width="30%">' . $filename1 . '</td>
<td width="40%">' . $filename2 . '</td>
<td width="30%">' . $filename3 . '</td>
</tr>';
}
?>
</table>
I think that is what you're trying to do.
~Brett