Create a stored procedure with at least two arguments (can be more than two), one for input and one for output. Write PHP code to execute the procedure and use the input and output parameters.
Consider the following tables:
Table 1: Users [user_id (p.k)]
Table 2: Summary [id(p.k)]
Create a stored procedure to insert data into the users table. The values to be stored must be passed as parameters to the stored procedure.
Create trigger(s) to update the records in the summary table. The summary table will contain only one record and will be updated each time a new entry is made to the users table, or an email address is updated in the users table or a user is deleted from the users table.
Insert data in the users table (at least 10 records) with different email addresses using the stored procedure created in (a). Check the summary table each time you add a new user, update a user’s email address or delete a user to check if the trigger(s) are working correctly.
1 | P a g e