Feat: Contact Form MySQL database created and hooked up to web app on form submission. \n Fix: Removal of ERP and otherwise deprecated database and server code..

This commit is contained in:
2025-03-21 11:12:03 +00:00
parent 63776954e1
commit 4f5037b504
477 changed files with 4298 additions and 102117 deletions

View File

@@ -0,0 +1,27 @@
USE partsltd_prod;
DROP TRIGGER IF EXISTS partsltd_prod.before_insert_PH_User_Change_Set;
DELIMITER //
CREATE TRIGGER partsltd_prod.before_insert_PH_User_Change_Set
BEFORE INSERT ON partsltd_prod.PH_User_Change_Set
FOR EACH ROW
BEGIN
IF NEW.updated_last_on <=> NULL THEN
SET NEW.updated_last_on = NOW();
END IF;
END //
DELIMITER ;
DELIMITER //
CREATE TRIGGER partsltd_prod.before_update_PH_User_Change_Set
BEFORE UPDATE ON partsltd_prod.PH_User_Change_Set
FOR EACH ROW
BEGIN
IF NOT EXISTS(SELECT * FROM partsltd_prod.PH_User WHERE id_user = NEW.id_user_updated_last_by) THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = 'New Updated-Last-By User ID must be provided.';
END IF;
END //
DELIMITER ;