ViniciusJau 0 Report post Posted April 5, 2005 e ai pessoal, eu queria fazer um consulta no BD e exibir uma linha de cada cor, eu já vi um tópico falando disso aqui no site,mais não sei como procuraralguém sabe como eu posso fazer ????vou colocar um exemplo: Share this post Link to post Share on other sites
0 resopi 0 Report post Posted April 5, 2005 Olá olha fiz um codigo de exemplo,... nesse codigo você vai verificar se o count é par se for pár ele coloca uma cor (branco) ou se não for par ele vai colocar outra cor(preto).é mais ou menos isso...<%if count mod 2 = 0 then%><tr bgcolor="#000000"><td><%=rs.fields("campo")%></td></tr><%else%><tr bgcolor="#FFFFFF"><td><%=rs.fields("campo")%></td></tr><%end ifcount = count + 1%>qualquer duvida entre em contato. Share this post Link to post Share on other sites
0 ViniciusJau 0 Report post Posted April 5, 2005 aee funfou legal resopi...<table width="285" border="1" cellpadding="0" cellspacing="0" bordercolor="#C0C0C0"><%if count mod 2 = 0 then%> <tr bgcolor="#FFFFFF"> <td width="56"><div align="right"><font face="Verdana, Arial" color="#003366" size="1"><%=Round(Rs("total"), 2)%> % </font></div></td> <td width="221"><font face="verdana" size="1"> <%=rs("central")%></font></td> </tr><%else%><tr bgcolor="#F0F0F0"> <td width="56"><div align="right"><font face="Verdana, Arial" color="#003366" size="1"><%=Round(Rs("total"), 2)%> % </font></div></td> <td width="221"><font face="verdana" size="1"> <%=rs("central")%></font></td> </tr><%end ifcount = count + 1%></table>só que ele exibiu o resultado com uma linha mais grossa, acho que é por causa do loop:na verdade acho viro duvida de html Share this post Link to post Share on other sites
0 Guest Guest Report post Posted April 5, 2005 <% dim vcor vcor="#000000" do while not rs.eof if vcor="#000000" then vcor="#FFFFFF" else vcor="#000000" end if <tr bgcolor=<%=vcor%>><td>....</td></tr> rs.movenext loop %> Share this post Link to post Share on other sites
0 ViniciusJau 0 Report post Posted April 5, 2005 resolvi, joguei a tabela fora do loop e só deixei as linhasvaleu moçada !! Share this post Link to post Share on other sites
0 cyberalexxx 0 Report post Posted April 6, 2005 Fechado!!! Share this post Link to post Share on other sites
e ai pessoal, eu queria fazer um consulta no BD e exibir uma linha de cada cor, eu já vi um tópico falando disso aqui no site,
mais não sei como procurar
alguém sabe como eu posso fazer ????
vou colocar um exemplo:
Share this post
Link to post
Share on other sites