DB_PUVM_System
DB_PUVM_System
DB_PUVM_System
*/
);
select*from tbl_accounts;
User_Fullname VARCHAR(100),
User_Midname VARCHAR(50),
User_Suffix VARCHAR(10),
);
);
);
DELIMITER $$
CREATE PROCEDURE InsertUserData(
IN firstName VARCHAR(50),
IN midName VARCHAR(50),
IN lastName VARCHAR(50),
IN suffix VARCHAR(10),
IN age INT,
IN gender VARCHAR(10),
IN birthDate DATE,
IN phoneNum VARCHAR(15),
IN email VARCHAR(100),
IN houseNum VARCHAR(10),
IN street VARCHAR(100),
IN brgy VARCHAR(50),
IN municipality VARCHAR(50),
IN province VARCHAR(50),
IN username VARCHAR(50),
IN password VARCHAR(255),
IN status VARCHAR(25),
IN Utype VARCHAR(25)
BEGIN
) VALUES (
);
User_phonenum, Acc_Email
) VALUES (
phoneNum, email
);
) VALUES (
);
) VALUES (
);
END$$
DELIMITER ;
SELECT
acc.Acc_password AS 'Password',
acc.Acc_Username AS 'Username',
up.User_Suffix AS 'Suffix',
up.User_age AS 'Age',
up.Acc_gender AS 'Gender',
up.Acc_Birthdate AS 'Birthdate',
uc.Acc_Email AS 'Email',
ua.User_street AS 'Street',
ua.User_brgy AS 'Barangay',
ua.User_Municipality AS 'Municipality',
ua.User_province AS 'Province',
FROM
tbl_user_profile up
LEFT JOIN
LEFT JOIN
-- Example of calling the procedure for 25 records with alternating User_type values
/*ROUTES*/
/*
*/
);
VALUES
select*from tbl_franchise
/*
Driver info
*/
);
select*from tbl_driver;
/*
PUV info
*/
V_id INT PRIMARY KEY AUTO_INCREMENT, -- Unique identifier for each vehicle
);
);
DELIMITER //
IN newData VARCHAR(255),
IN newDescription VARCHAR(255)
BEGIN
-- Check the count of records and delete the oldest if it exceeds the limit
LIMIT 1;
END IF;
END //
DELIMITER ;
VALUES
select*from tbl_franchise_reports;
SELECT
Rtr_description AS 'Description',
Rtr_datetime_ AS 'Date/Time'
FROM tbl_franchise_reports
);
DELIMITER //
in newID VARCHAR(255),
IN newData VARCHAR(255),
IN newDescription VARCHAR(255)
BEGIN
-- Check the count of records in tbl_driver_reports and delete the oldest if it exceeds the limit
LIMIT 1;
END IF;
-- Insert the new record into tbl_driver_reports
END //
DELIMITER ;
select*from tbl_driver_reports;
);
DELIMITER //
in newID VARCHAR(255),
IN newData VARCHAR(255),
IN newDescription VARCHAR(255)
BEGIN
-- Check the count of records in tbl_driver_reports and delete the oldest if it exceeds the limit
LIMIT 1;
END IF;
END //
DELIMITER ;