I must add stored procedures to MySQL database.
The problem is that the hosting offers phpMyAdmin to manage the database.
I searched on the Intern
I had trouble using the 'Routines' feature in PHPMyadmin cos it kept giving me false negatives so i did it via the 'SQL' tab instead.
CREATE PROCEDURE GetUserPwd(email VARCHAR(320), pass VARCHAR(128))
BEGIN
DECLARE userid INT(3) DEFAULT 0;
DECLARE password_equal INT(3) DEFAULT 0;
DECLARE output VARCHAR(30);
SELECT id INTO userid FROM members WHERE user_email = email;
IF userid != 0 THEN
SELECT user_pass = pass INTO password_equal FROM members WHERE id = userid;
IF password_equal = 0 THEN
SET output = 'not exist';
ELSE
SET output = 'exist';
END IF;
END IF;
SELECT output;
END
In the 'Delimiter' text box, type in '$$'. save.
after that , go to your 'Routines' tab and click on 'execute' and enter your inputs when prompted.