I need to write SQL statement that will return an html table and specify font size to its content.
I’ve found some information here. Solusion of this tipic describes how to get XML with elements but without attributes:
<tr>
<th>Problem</th>
<th>Onset</th>
<th>Status</th>
</tr>
<tr>
<td>aaa</td>
<td>bbb</td>
<td>ccc</td>
</tr>
But I need to write SQL statement that would return something like this:
<tr>
<th><font size="1">Problem</font></th>
<th><font size="1">Onset</font></th>
<th><font size="1">Status</font></th>
</tr>
<tr>
<td><font size="1">aaa</font></td>
<td><font size="1">bbb</font></td>
<td><font size="1">ccc</font></td>
</tr>
A couple thoughts.
1) Convert your SQL data to XML in your application, not in the query. .NET / PHP / Java all have ways to get SQL data as XML.
2) Use XSL to transform the XML from the database to HTML
3) Consider using CSS instead of
<font>tags.