Page 1 of 1

5-9.) The home page of the Brewbean’s Web site has an option for members to log on with their IDs and passwords. Develop

Posted: Mon Jul 11, 2022 9:55 am
by answerhappygod
5-9.)
The home page of the Brewbean’s Web site has an option formembers to log on with their IDs and passwords. Develop a procedurenamed MEMBER_CK_SP that accepts the ID and password as inputs,checks whether they make up a valid logon, and returns the membername and cookie value. The name should be returned as a single textstring containing the first and last name.The head developer wants the number of parameters minimized so thatthe same parameter is used to accept the password and return thename value. Also, if the user doesn’t enter a valid username andpassword, return the value INVALID in a parameter named p_check.Test the procedure using a valid logon first, with the usernamerat55 and password kile. Then try it with an invalid logon bychanging the username to rat.
▼ These are answersof the question ( I got this answer from answers) ▼
CREATE OR REPLACEPROCEDURE MEMBER_CK_SP(p_user IN VARCHAR2, p_pass IN VARCHAR2, p_FullName OUT VARCHAR2) ISfailour_msg varchar2(50) := 'INVALID USER NAME';CURSOR MEMBER_CUR ISSELECT firstname, lastname, cookie, username, PASSWORDFROM BB_shopperWHERE UPPER(username) = UPPER(div_name)(p_user)AND PASSWORD = p_pass;BEGINp_FullName := failour_msg;FOR REC_CUR IN MEMBER_CUR LOOP p_FullName := rec_cur.firstname || ' ' || rec_cur.lastname;DBMS_OUTPUT.PUT_LINE('Welcome: ' || p_pass || 'Cookie: ' ||rec_cur.cookie); END LOOP;IF p_FullName = failour_msg THEN DBMS_OUTPUT.PUT_LINE(failour_msg);END IF;END MEMBER_CK_SP;
CanI get screenshots of this question? It doesn't work on mylaptop