%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% response.expires = - 1500 %>
| Altre idee in... | |||||
| <%
' dati del giornale
id_giornale = request.QueryString("id")
if id_giornale="" then
sql = "SELECT * FROM tab_giornale ORDER BY id DESC"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, cn, 3,3
id_giornale = rs("id")
titolo_giornale = rs("titolo")
else
sql = "SELECT * FROM tab_giornale WHERE id="&id_giornale
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, cn, 3,3
titolo_giornale = rs("titolo")
end if
rs.close
Set rs = Nothing
'dati dei progetti
sql = "SELECT * FROM tab_progetti WHERE id_giornale='" & id_giornale & "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, cn, 3,3
titolo_progetto = rs("titolo")
testo_progetto = rs("testo")
testo_progetto = replace(testo_progetto,vbCrLf," ") link1_progetto = rs("link1") link2_progetto = rs("link2") link3_progetto = rs("link3") rs.close Set rs = Nothing 'dati dei libri sql = "SELECT * FROM tab_libri WHERE id_giornale='" & id_giornale & "'" Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sql, cn, 3,3 titolo_libri = rs("titolo") di_libri = rs("di") testo_libri = rs("testo") testo_libri = replace(testo_libri,vbCrLf," ") rs.close Set rs = Nothing 'dati dele ricette sql = "SELECT * FROM tab_ricette WHERE id_giornale='" & id_giornale & "'" Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sql, cn, 3,3 titolo_ricette = rs("titolo") ingredienti_ricette = rs("ingredienti") ingredienti_ricette = replace(ingredienti_ricette,vbCrLf," ") lavorazione_ricette = rs("lavorazione") lavorazione_ricette = replace(lavorazione_ricette,vbCrLf," ") rs.close Set rs = Nothing %>
|
| edizioni passate: <% sql = "SELECT * FROM tab_giornale ORDER BY id DESC" Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sql, cn, 3,3 do while not rs.EOF %> "><%=rs("titolo")%> <% rs.moveNext loop %> <% rs.close Set rs = Nothing cn.Close set cn = Nothing %> |