title: display BLOB pdf directly on webpage as download link
body: <p>I have a table in MySQL database. It consists of many columns. The last column is BLOB column and it is storing pdf files. I want to call particular columns of the table. The BLOB column is the last one. I want the <code>&lt;td&gt;</code> elements to say Download and on click of the anchor tag I want the pdf to get downloaded. Somebody please help. The values of the Copy Column is going to be pdf files.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>$result=  mysql_query("SELECT Name, Type, No, Copy from table1 Join table2 where username='{$_SESSION['username']}' AND table1.UserID=table2.UserID") or die(mysql_error());
  $fields_num = mysql_num_fields($result);
   echo "&lt;table class='table table-hover'&gt;";
   echo "&lt;th&gt;Name&lt;/th&gt;";
   echo "&lt;th&gt;Type&lt;/th&gt;";
   echo "&lt;th&gt;Number&lt;/th&gt;";
   echo "&lt;th&gt;Copy&lt;/th&gt;";
  if (mysql_num_rows($result) &gt; 0) {
      while ($row = mysql_fetch_assoc($result)) {
   echo "&lt;tr&gt;&lt;td&gt;".$row['Name']."&lt;/td&gt;&lt;td&gt;".$row['Type']."&lt;/td&gt;&lt;td&gt;".$row['No']."&lt;/td&gt;&lt;td&gt;"."&lt;a href=''&gt;Download&lt;/td&gt;&lt;/tr&gt;";
   }
  }
  echo "&lt;/table&gt;";</code></pre>
  </div>
  </div>
  </p>