Allora ti servono 2 tabelle:
tabella_aree
id_area - contatore
nome_area - testo
tabella_icone
id_icona - contatore
nome_icona - testo
url_icona - testo
id_area - numerico
Nella seconda tabella, nel campo id_area relazioni l'id dell'area con l'icona in modo da stabile a quale area appartiene l'icona.
Poi, con una query metti in JOIN le due tabelle e crei l'elenco.
codice:
<%
set conn = server.createObject("ADODB.Connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & server.mapPath("\db\db.mdb")
sql = "SELECT a.id_area, a.nome_area, b.nome_icona, b.url_icona FROM tabella_aree a INNER JOIN tabella_icone b ON b.id_area = a.id_area ORDER BY a.nome_area"
set rs = conn.execute(sql)
if not rs.eof then
id_area = 0
%>
<table width="600" border="1" align="center">
<tr>
<td colspan="2" align="center">
Emoticons :-)
In questa sezione troverete una serie di emoticon da utilizzare su MSN.
<%
do until rs.eof
if id_area <> rs("id_area") then
response.write " </td>" &vbCrLf
response.write " </tr>" & vbCrLf
response.write " <tr>" & vbCrLf
response.write " <td width=""200"">" & rs("nome_area") & "</td>" & vbCrLf
response.write " <td width=""400"">"
id_area = rs("id_area")
end if
response.write "[img][/img] "
rs.moveNext
loop
%>
</td>
</tr>
</table>
<%
end if
rs.close
set rs = nothing
conn.close
set conn = nothing
%>