-#Alea#- Posted August 4, 2004 Report Share Posted August 4, 2004 Olá pessoal como eu faço para buscar só os 10 ultimos cadastro no meu BD.Olhem até onde eu fiz... heheeh quase nada..Set RecSet = Server.CreateObject("adodb.recordset")RecSet.open "Select * from mensagem order by id_mensagem desc",conn if not RecSet.eof thenagora não seu se uso um Do until ou while ou For o que é melhor? Quote Link to comment Share on other sites More sharing options...
0 bareta Posted August 4, 2004 Report Share Posted August 4, 2004 faz assimRecSet.open "Select top 10 * from mensagem order by id_mensagem desc",connai faz um loop normal... Quote Link to comment Share on other sites More sharing options...
Question
-#Alea#-
Olá pessoal como eu faço para buscar só os 10 ultimos cadastro no meu BD.
Olhem até onde eu fiz... heheeh quase nada..
Set RecSet = Server.CreateObject("adodb.recordset")
RecSet.open "Select * from mensagem order by id_mensagem desc",conn
if not RecSet.eof then
agora não seu se uso um Do until ou while ou For o que é melhor?
Link to comment
Share on other sites
1 answer 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.