asp关于函数调用

来源:百度知道 编辑:UC知道 时间:2024/05/22 17:24:43
<!--#include file="../inc/Conn.asp"-->
<%
'取出商店名
Function GetshopName(shop)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select ID,ShopName From list Where ID="&shop&"",Conn,1,1
GetshopName = GetshopName

rs.Close
Set rs = Nothing
End Function
%>
<%=GetshopName(350)%>
为什么没有显示呢?350是其中条数据的ID编号
<%
'取出用户名
Function GetName(struserid,strFalg)
Set user_rs = Server.CreateObject("ADODB.Recordset")
user_rs.Open "Select U_User,Userface,Pet_Name From D_Member Where ID="&struserid&"",Conn,1,1
If Not(user_rs.Eof And user_rs.Bof) Then
If strFalg = 0 Then
GetName = "<a href='/space.asp?author="&user_rs("U_User")&"' target='_blank'>"&user_rs("Pet_Name")&"</a>"
Else
GetName = &q

Function GetshopName(shop)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select ID,ShopName From list Where ID="&shop&"",Conn,1,1
GetshopName = rs("ShopName ")

rs.Close
Set rs = Nothing
End Function
%>
<%=GetshopName(350)%>
------------------------------
GetshopName = GetshopName 这句写错了