使用sql表验证条目 [英] validate entries using an sql table

查看:57
本文介绍了使用sql表验证条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!


i想要使用我创建的sql表验证用户名和密码。

i尝试了以下代码:

展开 | 选择 | Wrap | 行号

解决方案

尝试使用

选择计数(*)来自tbl_LoginIDsets,其中user_name =''username''和密码='''密码''


如果此查询返回1,则继续进行并登录其他重新启动正确的用户名和密码。


你没有输入用户名和密码。



尝试使用

选择计数(*)来自tbl_LoginIDsets,其中user_name =''username''和密码='''密码''


如果此查询返回1然后继续进行并登录,则重新提示输入正确的用户名和密码。



i现在尝试了以下代码:


展开 | 选择 | Wrap | 行号

Hi all!

i want to validate the user name and password using an sql table i created.
i have tried the following code:

Expand|Select|Wrap|Line Numbers

解决方案

try to use

Select count(*) from tbl_LoginIDsets where user_name=''username'' and password=''password''

if this query returns 1 then proceed further and login else reprompt for the correct username and password.


You didn''t check for the entered username and password.


try to use

Select count(*) from tbl_LoginIDsets where user_name=''username'' and password=''password''

if this query returns 1 then proceed further and login else reprompt for the correct username and password.


i have now tried the following code:


Expand|Select|Wrap|Line Numbers


这篇关于使用sql表验证条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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