标签:查询 否则 校验 语句 phone mysql 登录 one rom
1.存在型验证 select 1, 例如:
SELECT
1
FROM
worker
WHERE
phone = 18611406603 存在为1,否则为空
2.登录型校验 limit 1,例如:
SELECT
`password`
FROM
worker
WHERE
phone = 18611406603
LIMIT 1
结果无值,不需验证;有值,校验
3.数量型查询 SELECT COUNT(1) 例如:
SELECT
COUNT(1)
FROM
worker
WHERE
phone = 18611406603
4.字段型查询
SELECT
`password`
FROM
worker
WHERE
phone = 18611406603
标签:查询 否则 校验 语句 phone mysql 登录 one rom
原文地址:https://www.cnblogs.com/ynhk/p/10768881.html