Listar por Coluna
Olá pessoal estou usando um esquema de listar por coluna, porem ele esta listando por linha em ordem alfabetica
gostaria de listar por coluna em ordem alfabetica, segue o código...
<%
Call abre_conexao1(ConnString,Conn)
sql = "SELECT * FROM cidadeconteudo INNER JOIN cidade ON cidadeconteudo.CidContCidade = cidade.CidId where CidContUF = '"&uf&"' order by cidade.CidNome"
Set RS = Conn.Execute(sql)
%>
<%
If RS.eof or RS.bof then
%>
Nenhum registro no momento<br />
<a href="javascript:history.go(-1)">Voltar</a>
<%else%>
table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<%
'Dim contador
contador = 1
maxcol = 3 '<-- numero de registros por colunas
do while not RS.eof
%>
<%
if contador <= maxcol then %>
<td valign="top"> <%=RS("CidContId")%> </td>
<%
contador = contador + 1
else %>
</tr>
<tr>
<td valign="top"> <%=RS("CidContId")%> </td>
<%
contador = 2
end if
RS.movenext
loop
'completa as colunas
do while contador <= maxcol %>
<td> </td>
<%
contador = contador + 1
loop
%>
</tr>
<%
RS.Close
Set RS = Nothing
Call fecha_conexao1()
%>
</table>
<%End If%>
Discussão (7)
Carregando comentários...