用户使用过一次激活码后如何删除?
创建新会员时,应发送注册确认电子邮件和激活码。一旦用户使用激活码。它应该不再有效。我想删除激活码。
激活码使用后如何从数据库中删除?
when a new member is created , an registration confirmation email should be sent along with an activation code. once the user used the activation code. it shouldnt be valid anymore. I want to delete the activation code.
how to delete the activation code from database once its been used?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
鉴于许多问题仍然没有答案,这个答案是一个概念答案。
它不能像这样“正常工作”,但它会给你一个如何处理这个问题的想法。
对于此示例,我假设您在自己的单独表中跟踪激活码。
(我在本例中将其命名为
tblActivationCodes
)。一旦用户“激活”,请使用类似的调用从数据库表中删除相应的激活代码:
此代码将起作用仅在将
activationCode
作为内联请求的Page
的load
事件中多变的。http://www.mysite.com/activate.aspx?activationCode=12345-678-90
现在,告诉您正在使用的任何数据库(您没有向我提供足够的信息)执行该查询。
Given the fact that many questions are still unanswered, this answer is a concept-answer.
It can't 'just work' like this, but it will give you an idea on how to handle this.
for this example, i'll assume you keep track of activation codes in a separate table of their own.
(which i have named
tblActivationCodes
in this example).Once the user 'activates', drop the corresponding activation code from the database table with a similar call :
this code will work only in the
load
event of aPage
that takesactivationCode
as an inline request variable.http://www.mysite.com/activate.aspx?activationCode=12345-678-90
Now, tell whatever database you're using, (you have not provided me with enough info for this) to execute that query.