Salve a tutti voi, è da pochi giorni che provo a programmare qualcosa in asp e ora sto cercando di farmi restituire delle news dal database.
Diciamo che riesco a visualizzarle in questo modo:
' PRELEVA LE ULTIME 10 NEWS DAL DATABASE (SE SONO PRESENTI)
SQL = "SELECT TOP 10 * FROM NEWS ORDER BY DATA DESC"
RecSet.Open SQL, Conn, adOpenStatic, adLockOptimistic
' CONTROLLA SE SONO PRESENTI NEWS NEL DB
If RecSet.Eof = False Then
' VISUALIZZA LE PRIME 10 NEWS
Do until RecSet.Eof
%>
<div class="titolo_news"><%=RecSet("Titolo")%></div>
<div class="testo_news"><%=RecSet("Intro")%></div>
<div class="continua">">continua</div>
<%
RecSet.Movenext
Loop
End IF
RecSet.Close
Conn.Close
Set Conn = Nothing
Set RecSet = Nothing
%>
e fin qui tutto ok...ma se volessi poi chiedere anche
SQL = "SELECT * FROM NEWS where news_princ='si' ORDER BY DATA DESC"
dove dovrei chiederlo esattamente?
Grazie