|
- <%@ language=vbscript codepage="65001" %>
- <!--#include file="conn.asp"-->
- <!--#include file="function.asp"-->
- <%
- Response.Charset = "UTF-8"
-
- c_openid = request("openid")
-
- c_rtn = ""
- csql = "APP_MEMBER_LINKER_GET_LIST '" & c_openid & "'"
- ' response.write csql
- set rs=conn.execute(csql)
- if not rs.eof then
- nnum1 = rs("errcode")
- c_rtn = "{""code"":""" & nnum1 & ""","
- c_rtn = c_rtn & """info"":""" & rs("errinfo") & """"
- nnum2 = rs("linker_count")
- if nnum2 - 0 > 0 then
- c_rtn = c_rtn & ",""customer"":["
- c_rtn1 = ""
- do until rs.eof
- c_rtn1 = c_rtn1 & "{"
- c_rtn1 = c_rtn1 & """customer_id"":""" & rs("id") & ""","
- c_rtn1 = c_rtn1 & """customer_name"":""" & rs("customer_name") & ""","
- c_rtn1 = c_rtn1 & """customer_mobile"":""" & rs("customer_mobile") & ""","
- c_rtn1 = c_rtn1 & """customer_idtype"":""" & rs("customer_id_type") & ""","
- c_rtn1 = c_rtn1 & """customer_idno"":""" & rs("customer_id_no") & """},"
- rs.movenext
- loop
- if right(c_rtn1,1)="," then c_rtn1 = left(c_rtn1,len(c_rtn1)-1)
- c_rtn = c_rtn & c_rtn1
- c_rtn = c_rtn & " ]" & vbcrlf
- end if
- c_rtn = c_rtn & "}" & vbcrlf
- end if
- rs.close
-
- response.write c_rtn
- %>
|