rem== on an Article = =
rem================================================================
rem= parameter Description:
rem= pid current id,prame: column prefix (such as General web_news table, when the field is generally wn_**,prame on behalf of WN)
rem= ptable (table prefix). If the general table name is: Station name _ Table (shenzhe_news) PTable: On behalf of Shenzhe)
Rem= Description: The above naming method enables the process to achieve universal
rem===============================================================
Function Getpre (pid,prame,ptable)
id = prame& "_id"
title = prame& "_title"
Table = "City_" &ptable
url = "Show_" &ptable
sql = "SELECT top 1" &id& "&title&" from "&table&" WHERE "&id&" < "&pid&" ORDER BY "&id&" DESC "
Set rs = conn.execute (SQL)
If rs.eof or Rs.bof Then
Pre = "Previous: no News"
Else
Pre = "<a href=" &url& ". asp?" &id& "=" &rs (0) & ">" &rs (1) & "</a>"
End If
Getpre = Pre
End Function
Rem = Next article
rem=============
The rem= parameter is the same as the previous procedure.
rem==========
Function GetNext (nid,nrame,ntable)
id = nrame& "_id"
title = nrame& "_title"
Table = "City_" &ntable
url = "Show_" &ntable
sql = "SELECT top 1" &id& "&title&" from "&table&" WHERE "&id&" > "&nid&" ORDER BY "&id&"
Set rs = conn.execute (SQL)
If rs.eof or Rs.bof Then
NNext = "Next: no News"
Else
NNext = "<a href=" &url& ". asp?" &id& "=" &rs (0) & "> Next:" &rs (1) & "</a>"
End If
GetNext = NNext
End Function
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.