You have a mistake in your last WHERE condition. product_code = '$product_code'
must be id = '$product_code'
Additionally, you can fetch two columns with a single query:
$row = mssql_fetch_array(mssql_query("select product_img_name, specsheet from products where id = $product_code"));
unlink("img/$row[0]");
unlink("specsheets/$row[1]");