Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HW 4 SP 1 Write SP: Purpose : Practice creation of stored procedures Instruction : Use Users table to create stored procedures for the following

HW 4 SP

1 Write SP:

Purpose: Practice creation of stored procedures

Instruction:

Use Users table to create stored procedures for the following information queries:

1. Write a stored procedure to find the earliest registration date by a OUT parameter. (use min())2. Write a stored procedure to find the registration date by a IN user_id parameter and a OUT parameter.

3. Write a stored procedure to add a new user. Provide IN parameters of user_id, first_name, last_name, email, pass and registration_date. 4. Write a stored procedure to delete a user by providing an IN user_id. 5. Write a stored procedure to retrieve all the records from users table? 6. Write a stored procedure to update the email of a user by an IN user_id and IN email parameters. Thing to submit: 1. All the stored procedure statements. 2. A screen shot for the successful execution of each stored procedure. 3. Submit a Word file that contains all the results and screen shot.

2 Create the SP to change the register.php code as :

Replacing

$q = "INSERT INTO users (first_name, last_name, email, pass, registration_date) VALUES ('$fn', '$ln', '$e', SHA1('$p'), NOW() )";

with

$q="CALL register_proc('$fn', '$ln', '$e', '$p')";

Submit the SP in the Word file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 22nd International Conference Dexa 2011 Toulouse France August/September 2011 Proceedings Part 1 Lncs 6860

Authors: Abdelkader Hameurlain ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2011th Edition

3642230873, 978-3642230875

More Books

Students also viewed these Databases questions

Question

What are the main objectives of Inventory ?

Answered: 1 week ago

Question

Explain the various inventory management techniques in detail.

Answered: 1 week ago