J'importe une procédure stockée que je viens d'exporter de mon serveur de développement vers mon serveur de production et j'ai rencontré l'erreur suivante dans phymyadmin.MYSQL Erreur 1064 lors de l'importation de procédures stockées
SQL query: Documentation
$$ CREATE DEFINER = `devuser`@`localhost` FUNCTION `get_refundable_amount` (
enrol_id INT
) RETURNS double(10, 2) READS SQL DATA BEGIN DECLARE refundable_amount double(10, 2) DEFAULT 0;
SELECT (
sum(P.amount) - EI.amount
)
INTO refundable_amount
FROM site_payment_processed AS P
INNER JOIN site_user_enroled AS E ON (P.enrol_id = E.id
AND P.payment_type = 'Refund')
INNER JOIN site_user_enroled_invoice AS EI ON EI.enrol_id = E.id
WHERE E.id = enrol_id
GROUP BY E.id;
RETURN (
refundable_amount
);
END$$
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$
CREATE DEFINER=`devuser`@`localhost` FUNCTION `get_refundable_amount`' at line 1
Veuillez fournir une explication pour le code. –