一个典型的SQL变量查询

%
Set rs = Server.CreateObject("ADODB.RecordSet")
Sql = "Select * From list where left(c_kaishi,7) like '"&nian&"-1-' and c_renyuan = '"&Request.Cookies("user")&"'"
rs.Open Sql,Conn,1,1
%>
<%
DO WHILE NOT rs.EOF
SZD=SZD+rs("c_je")
rs.MoveNext
LOOP
%>
<%
=FormatNumber(szd)
%>
<%
rs.close
set rs = nothing
%>

你可能感兴趣的:(数据库,职场,where,休闲)