问题描述:
<%
if(Request.QueryString("证件号") <> "") then Command1__usr_ip = Request.QueryString("证件号")
%>
<%
Dim rs1__MMColParam
rs1__MMColParam = "1"
If (Request.QueryString("ID") <> "") Then
rs1__MMColParam = Request.QueryString("ID")
End If
%>
<%
Dim rs1
Dim rs1_numRows
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.ActiveConnection = MM_sdf_STRING
rs1.Source = "SELECT * FROM 导游翻译 WHERE ID = " + Replace(rs1__MMColParam, "'", "''")
rs1.CursorType = 0
rs1.CursorLocation = 2
rs1.LockType = 1
rs1.Open()
rs1_numRows = 0
%>
<%
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_sdf_STRING
Command1.CommandText = "INSERT INTO renqi (nameid) VALUES ('" + Replace(Command1__usr_ip, "'", "''") + "') "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
%>
<%
Dim rs2__MMColParam
rs2__MMColParam = "1"
If (Request.QueryString("证件号") <> "") Then
rs2__MMColParam = Request.QueryString("证件号")
End If
%>
<%
Dim rs2
Dim rs2_numRows
Set rs2 = Server.CreateObject("ADODB.Recordset")
rs2.ActiveConnection = MM_sdf_STRING
rs2.Source = "SELECT * FROM renqi WHERE nameid = '" + Replace(rs2__MMColParam, "'", "''") + "'"
rs2.CursorType = 0
rs2.CursorLocation = 2
rs2.LockType = 1
rs2.Open()
rs2_numRows = 0
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim rs2_total
Dim rs2_first
Dim rs2_last
' set the record count
rs2_total = rs2.RecordCount
' set the number of rows displayed on this page
If (rs2_numRows < 0) Then
rs2_numRows = rs2_total
Elseif (rs2_numRows = 0) Then
rs2_numRows = 1
End If
' set the first and last displayed record
rs2_first = 1
rs2_last = rs2_first + rs2_numRows - 1
' if we have the correct record count, check the other stats
If (rs2_total <> -1) Then
If (rs2_first > rs2_total) Then
rs2_first = rs2_total
End If
If (rs2_last > rs2_total) Then
rs2_last = rs2_total
End If
If (rs2_numRows > rs2_total) Then
rs2_numRows = rs2_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (rs2_total = -1) Then
' count the total records by iterating through the recordset
rs2_total=0
While (Not rs2.EOF)
rs2_total = rs2_total + 1
rs2.MoveNext
Wend
' reset the cursor to the beginning
If (rs2.CursorType > 0) Then
rs2.MoveFirst
Else
rs2.Requery
End If
' set the number of rows displayed on this page
If (rs2_numRows < 0 Or rs2_numRows > rs2_total) Then
rs2_numRows = rs2_total
End If
' set the first and last displayed record
rs2_first = 1
rs2_last = rs2_first + rs2_numRows - 1
If (rs2_first > rs2_total) Then
rs2_first = rs2_total
End If
If (rs2_last > rs2_total) Then
rs2_last = rs2_total
End If
End If
%>
问题解答:
一段ASP显示同一页面不同的导游的人气指数代码,请问大家错在哪啊?不自动记数!这个旅游问答期待您的解答,请登录账号或关注微信公众号回答这个问题。