谁能告诉我问题出在哪里? [英] Can anyone tell me where is the problem?

查看:94
本文介绍了谁能告诉我问题出在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过计算所选行的数量来编写登录系统的程序,但它会一直输出1.



我是什么尝试过:



I'm trying to write a procedure to login into a system by counting the number of selected rows but it keeps outputting 1.

What I have tried:

create or replace PROCEDURE Login
(email in VARCHAR2, passwordd in VARCHAR2, counter out number)
is
begin

select count(customer_email)into counter
from customer 
where customer.customer_email = email and customer.passwordd = passwordd;

end;

推荐答案

这看起来就像你要求的那样。除非您有多个客户使用相同的电子邮件地址全部使用相同的密码。即重复。
That looks like exactly what you are asking it to do. Unless you have multiple customers with the same email address all using the same password. i.e. Duplicates.


不要这样做。切勿以明文形式存储密码 - 这是一个主要的安全风险。有关如何在此处执行此操作的信息:密码存储:如何做到这一点。 [ ^ ]

请记住:如果这是基于网络的,并且您有任何欧盟用户,那么GDPR适用,这意味着您需要将密码作为敏感数据处理并存储在一种安全可靠的方式。文字不是那些,罚款可以......呃......非常好。 12月,一家德国公司获得了相对较低的罚款,即20,000欧元。
Don't do it like that. Never store passwords in clear text - it is a major security risk. There is some information on how to do it here: Password Storage: How to do it.[^]
And remember: if this is web based and you have any European Union users then GDPR applies and that means you need to handle passwords as sensitive data and stored them in a safe and secure manner. Text is neither of those and the fines can be .... um ... outstanding. In December a German company received a relatively low fine of €20,000 for just that.


这篇关于谁能告诉我问题出在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆