added first controller and corresponding stored procedures.

This commit is contained in:
2026-02-18 22:03:35 -08:00
parent 9d9a416d1c
commit 690ea97826
24 changed files with 1094 additions and 75 deletions
@@ -0,0 +1,25 @@
DROP PROCEDURE IF EXISTS sp_Student_Update;
DELIMITER $$
CREATE PROCEDURE sp_Student_Update(
IN p_id_student INT,
IN p_id_program INT,
IN p_identifier VARCHAR(50),
IN p_program_year INT,
IN p_enrollment_date DATE,
IN p_expected_grad DATE
)
BEGIN
UPDATE student
SET
id_program = COALESCE(p_id_program, id_program),
identifier = COALESCE(p_identifier, identifier),
program_year = COALESCE(p_program_year, program_year),
enrollment_date = COALESCE(p_enrollment_date, enrollment_date),
expected_grad = COALESCE(p_expected_grad, expected_grad)
WHERE id_student = p_id_student;
SELECT ROW_COUNT() AS rows_affected;
END$$
DELIMITER ;