title: How to fill a cell with database tables
body: <p>I was wondering how you can fill a whole column of a table from a database table? using HTML and SQL? I am using Toad for Oracle and using MySQL as a compiler. I just want to fill a column using a loop but don't know how to do it?</p>
  
  <p>if I had a table like :</p>
  
  <pre><code>Table1
  ------
    Y
    N
    Y
  </code></pre>
  
  <p>Here is the procedure code:</p>
  
  <pre><code>procedure proc1
  
  is
  
  begin 
  
  
  HTP.P('
  
  &lt;HTML&gt;
  &lt;BODY&gt;
  
  &lt;b&gt; &lt;font size="4" color=black&gt;Status Log&lt;/font&gt; &lt;/b&gt;
  &lt;table bgcolor="black" width=1020 align="center" border="0"  cellspacing="1" class="sortable"&gt;&lt;THEAD&gt;&lt;tr bgcolor="#CCCCCC"&gt;
  
  
  ');
  
  
  
  htp.p('
  
  &lt;th width=30 align=left&gt;&lt;font size="2"&gt;Phase&lt;/font&gt;&lt;/th&gt;
  
          &lt;td&gt;  &lt;/td&gt;
  
  &lt;th width=50 align=left&gt;&lt;font size="2"&gt;State&lt;/font&gt;&lt;/th&gt;
  
          &lt;td&gt;  &lt;/td&gt;
  
  &lt;th width=414 align=left&gt;&lt;font size="2"&gt;CHG&lt;/font&gt;&lt;/th&gt;
  
          &lt;td&gt;  &lt;/td&gt;
  
  &lt;th width=30 align=left&gt;&lt;font size="2"&gt;Changes&lt;/font&gt;&lt;/th&gt;
  
          &lt;td&gt;  &lt;/td&gt;
  
  &lt;th width=180 align=left&gt;&lt;font size="2"&gt;Completed&lt;/font&gt;&lt;/th&gt;
  
          &lt;td&gt;  &lt;/td&gt;
  
  &lt;/table&gt;
  
  &lt;/BODY&gt;
  &lt;/HTML&gt;
  
  ');
  
  end proc1;
  </code></pre>