2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-07-22 09:52:42 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`messageSend`(vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8)
|
2024-01-15 11:31:03 +00:00
|
|
|
RETURNS int(11)
|
|
|
|
NOT DETERMINISTIC
|
|
|
|
READS SQL DATA
|
|
|
|
BEGIN
|
|
|
|
DECLARE result INT;
|
|
|
|
DECLARE vSenderFk INT;
|
|
|
|
|
|
|
|
SELECT id INTO vSenderFk
|
|
|
|
FROM account.user WHERE `name` = account.myUser_getName();
|
|
|
|
|
|
|
|
RETURN (SELECT messageSendWithUser(vSenderFk, vRecipient, vMessage));
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|