Prof. Jonatas Posted November 24, 2006 Report Share Posted November 24, 2006 Galera eu to criando uma tabela que pega os dados de um banco de dados.Por exemplo, eu cadastro várias máquinas, depois tenho que mostrar as máquinas cadastradas.Eu consegui puxar do banco de dados a primeira máquina que foi cadastrada, mas e depois, e as demais como que eu faço?Segue abaixo o código.:<!--#include file="conexao.asp"--> <html> <head> <title>Produtos1</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> <table width="282" border="0" cellspacing="5" cellpadding="0" height="130"> <tr> <td height="12" width="103" valign="top"> <font size="2" face="Verdana" color="#000000">Ref.: <%=rs_max("referencia")%> </font></td> <td width="164" height="12"><b><font size="2" face="Verdana" color="#000000"><%=rs_max("titulo")%></font></b></td> </tr> <tr> <td height="12" width="103" valign="top"> <table width="33" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <div align="left"><img src="imgs/<%=rs_max("Img")%>" width="80" height="80" border="1"></div> </td> </tr> <tr> <td><img src="imgs/5px.gif" width="1" height="5"></td> </tr> <tr> <td> <div align="center"><a href="imgs/<%=rs_max("JPG")%>"><img src="imgs/amp_img.jpg" width="70" height="18" border="0"></a></div> </td> </tr> </table> </td> <td valign="top" width="164"> <p><font size="2" face="Verdana" color="#000000"><%=rs_max("descricao")%></font></p> </td> </tr> </table> </body> </html> por favor galera alguém me ajuda... :o valeu... to aguardando :( Quote Link to comment Share on other sites More sharing options...
0 Marcos-rj Posted November 24, 2006 Report Share Posted November 24, 2006 Tem que fazer o loop<%Do While not RS.EOF%> os dados a ser paginado... <%RS.MoveNext Loop%> Quote Link to comment Share on other sites More sharing options...
0 Henderson Posted November 25, 2006 Report Share Posted November 25, 2006 está aqui o que o marcos falo!se tu tive duvida de como qe é pra monta o codigo<!--#include file="conexao.asp"--> <html> <head> <title>Produtos1</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> <table width="282" border="0" cellspacing="5" cellpadding="0" height="130"> <% do while not rs_max.eof %> <tr> <td height="12" width="103" valign="top"> <font size="2" face="Verdana" color="#000000">Ref.: <%=rs_max("referencia")%> </font></td> <td width="164" height="12"><b><font size="2" face="Verdana" color="#000000"><%=rs_max("titulo")%></font></b></td> </tr> <tr> <td height="12" width="103" valign="top"> <table width="33" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <div align="left"><img src="imgs/<%=rs_max("Img")%>" width="80" height="80" border="1"></div> </td> </tr> <tr> <td><img src="imgs/5px.gif" width="1" height="5"></td> </tr> <tr> <td> <div align="center"><a href="imgs/<%=rs_max("JPG")%>"><img src="imgs/amp_img.jpg" width="70" height="18" border="0"></a></div> </td> </tr> </table> </td> <td valign="top" width="164"> <p><font size="2" face="Verdana" color="#000000"><%=rs_max("descricao")%></font></p> </td> </tr> <% rs_max.movenext loop %> </table> </body> </html> Quote Link to comment Share on other sites More sharing options...
Question
Prof. Jonatas
Galera eu to criando uma tabela que pega os dados de um banco de dados.
Por exemplo, eu cadastro várias máquinas, depois tenho que mostrar as máquinas cadastradas.
Eu consegui puxar do banco de dados a primeira máquina que foi cadastrada, mas e depois, e as demais como que eu faço?
Segue abaixo o código.:
por favor galera alguém me ajuda... :o
valeu... to aguardando :(
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.