登录页面的MySQL语法错误 [英] MySQL syntax error for login page

查看:100
本文介绍了登录页面的MySQL语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Create procedure sp_validatelogin(IN email varchar(50), IN ppassword VARCHAR(50))
BEGIN
if exists(Select * From user_details
Where `email`=email
And
`password` = ppassword) THEN
SELECT 1;
else
select 0;
END;



我的错误是



My error is

-[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 10.



请有想法的人告诉我.

在此先感谢.



Please someone having some idea then tell me.

Thanks in advance.

推荐答案

尝试一下
Create procedure sp_validatelogin(IN email varchar(50), IN ppassword VARCHAR(50))
BEGIN
if (Select * From user_details Where `email`=email And `password` = ppassword) THEN
  SELECT 1;
else
  select 0;
END;


这篇关于登录页面的MySQL语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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