How can I make a function in a MySQL database that can include some queries for insert
table1 and select
or anything in another table, and get the parameters in a function to the value
DELIMITER $
CREATE FUNCTION registration(username varchar(15), password(15), level_user int(1), name varchar(30), email varchar(30), address varchar(50)) RETURNS int
BEGIN
INSERT INTO users(username, password, level_user, created, modified) VALUES('username', 'password', 'level_user');
INSERT INTO employes(name, email, adrress) VALUES('name','email', 'address');
END $