2024-03-13 13:00:59 +00:00
|
|
|
DROP PROCEDURE IF EXISTS floranet.contact_request;
|
2024-02-15 13:37:09 +00:00
|
|
|
|
|
|
|
DELIMITER $$
|
|
|
|
$$
|
|
|
|
CREATE DEFINER=`root`@`localhost`
|
2024-03-13 13:00:59 +00:00
|
|
|
PROCEDURE floranet.contact_request(
|
2024-02-15 13:37:09 +00:00
|
|
|
vName VARCHAR(100),
|
|
|
|
vPhone VARCHAR(15),
|
|
|
|
vEmail VARCHAR(100),
|
|
|
|
vMessage TEXT)
|
|
|
|
READS SQL DATA
|
|
|
|
BEGIN
|
|
|
|
/**
|
2024-04-11 11:25:43 +00:00
|
|
|
* Set actions for contact request
|
2024-02-15 13:37:09 +00:00
|
|
|
*
|
2024-05-14 07:03:49 +00:00
|
|
|
* @param vName Name
|
|
|
|
* @param vPhone Phone number
|
|
|
|
* @param vEmail e-mail
|
|
|
|
* @param vMessage text of the message
|
2024-02-15 13:37:09 +00:00
|
|
|
*/
|
2024-05-14 07:03:49 +00:00
|
|
|
|
|
|
|
CALL vn.mail_insert(
|
2024-05-14 12:01:13 +00:00
|
|
|
'floranet@verdnatura.es',
|
2024-05-14 07:03:49 +00:00
|
|
|
vEmail,
|
|
|
|
'Contact request',
|
|
|
|
CONCAT('Phone: ',vPhone, ' Message: ', vMessage)
|
|
|
|
);
|
2024-02-15 13:37:09 +00:00
|
|
|
END$$
|
|
|
|
DELIMITER ;
|