23 lines
426 B
MySQL
23 lines
426 B
MySQL
|
|
||
|
DROP procedure IF EXISTS `hedera`.`myOrder_getAvailable`;
|
||
|
DELIMITER $$
|
||
|
CREATE DEFINER=`root`@`%` PROCEDURE `hedera`.`myOrder_getAvailable`(vSelf INT)
|
||
|
BEGIN
|
||
|
/**
|
||
|
* Gets the available items list.
|
||
|
*
|
||
|
* @param vSelf The order id
|
||
|
* @table tmp.itemAvailable
|
||
|
*/
|
||
|
DECLARE isMine BOOL;
|
||
|
|
||
|
SELECT COUNT(*) INTO isMine
|
||
|
FROM myOrder
|
||
|
WHERE id = vSelf;
|
||
|
|
||
|
IF isMine THEN
|
||
|
CALL order_getAvailable(vSelf);
|
||
|
END IF;
|
||
|
END$$
|
||
|
DELIMITER ;
|