salix/db/routines/floranet/procedures/order_confirm.sql

25 lines
472 B
MySQL
Raw Normal View History

2024-02-15 12:13:22 +00:00
DROP PROCEDURE IF EXISTS floranet.order_confirm;
DELIMITER $$
$$
CREATE DEFINER=`root`@`localhost`PROCEDURE floranet.order_confirm(vCatalogueFk INT)
READS SQL DATA
BEGIN
2024-04-11 11:25:43 +00:00
/** Update order.isPaid field.
2024-02-15 12:13:22 +00:00
*
* @param vCatalogueFk floranet.catalogue.id
*
* @returns floranet.order.isPaid
*/
UPDATE `order`
SET isPaid = TRUE,
payed = NOW()
WHERE catalogueFk = vCatalogueFk;
SELECT isPaid
FROM `order`
WHERE catalogueFk = vCatalogueFk;
END$$
DELIMITER ;