<%dim user,psw,sql,rsuser=request.form("username")psw=request.form("password")sql="select * from z_user where user='"&user&"' and psw='"&psw&"'"Set rs= Server.CreateObject("ADODB.Recordset")rs.open sql,conn,1,1if rs.bof and rs.eof thenresponse.write "<script>alert('用戶名或密碼輸入錯(cuò)誤。');window.location.href='login.asp'</script>"elseresponse.write "正確,用戶編號(hào):"&rs("id")end ifrs.closeset rs=nothing%>我這段代碼中的SQL語(yǔ)句沒(méi)問(wèn)題啊,為什么現(xiàn)在出現(xiàn)的問(wèn)題是無(wú)論輸入的是值是大寫(xiě)還是小寫(xiě),都能通過(guò)?難道SQL的值比較是忽略大小寫(xiě)的?
關(guān)于ASP中SQL查詢(xún)語(yǔ)氣的問(wèn)題 ?
拉莫斯之舞
2018-07-13 20:21:34