Rem==上一篇==
Rem======================================================
Rem= 參數說明:
Rem= pid當前ID
Rem= ptable(表前辍
Rem= 說明:采用上面命名法
Rem=====================================================
Function GetPre(pid
id = prame&"_id"
title = prame&"_title"
table = "city_"&ptable
url = "show_"&ptable
sql = "SELECT TOP
set rs = Conn
If rs
pre = "上一篇:沒有新聞了"
Else
pre = "<a href="&url&"
End If
GetPre = pre
End Function
Rem = 下一篇
Rem=============
Rem= 參數函意和上過程一樣
Rem==========
Function GetNext(nid
id = nrame&"_id"
title = nrame&"_title"
table = "city_"&ntable
url = "show_"&ntable
sql = "SELECT TOP
set rs = Conn
If rs
nnext = "下一篇:沒有新聞了"
Else
nnext = "<a href="&url&"
End If
GetNext = nnext
End Function
實現代碼:
偶數據庫裡有表:
city_active city_date city_note
city_active主要字段有: ca_id
city_date主要字段有: cd_id
city_note主要字段有: cn_id
這樣引用就可:
在show_note
<%=GetPre(cn_id
<%=GetNext(cn_id
From:http://tw.wingwit.com/Article/program/net/201311/14431.html