When I execute the code below I am getting unknown column 'total' in 'field list' error.
DELIMITER$$
CREATE PROCEDURE setAuthentication(IN uname varchar(12), IN oldpws VARCHAR(12), IN newpws VARCHAR(12), OUT status INT)
BEGIN
call getAuthentication(uname,oldpws,@total,@pwsval);
IF(total=1 AND pwsval IS NOT NULL) THEN
UPDATE authentication SET password = newpws WHERE loginId=uname and password=oldpws;
SET status = 1;
ELSE
SET status = 0;
END IF;
END$$
DELIMITER;
What is the root cause of the problem?. Your help is kindly appreciated.