sql="select * from [A] order by Aid desc"
sql="select * from [A] where BID=“&BID&”order by Aid desc"
sql="select * from [A] where CID=“&CID&”order by Aid desc"
访问index.asp
就读出全部记录
当访问 index.asp?BID=BID
就读出 BID 的记录
当访问 index.asp?BID=BID&CID=CID 就读出 CID的记录啊
简单的说 sql="select * from [A]" if bid<>"" and bid<>null and cid="" then sql=sql&" where bid="&bid if cid<>"" and cid<>null then sql=sql&" sql=sql&" where CID=“&CID sql=sql&" order by Aid desc" ……