iO a tutti
sono un neofita e devo modificare una semplivce area news inserendo un tasto in basso alla news che vada alla precedente oltre che alla successiva (ordinata per data e poi per ID).
Questo è il codice del next':
<%
nextid=-1
rs.Open "SELECT * FROM Tab_NWS WHERE Visualizza=true ORDER by Data DESC, ID desc",oConn,2,3
do until rs.EOF
if rs("ID")=Cint(id) then
rs.MoveNext
if not rs.EOF then
nextid=rs("id")
end if
exit do
end if
rs.MoveNext
loop
rs.Close
if nextid<>-1 then
%>
<a href="dettaglio.asp?id=<%=nextid%>">
[img]../img/arrowright.png[/img]</a>
<%
end if
%>
Grazie mille