update structure DB

This commit is contained in:
Bernat 2018-06-07 07:19:27 +02:00
parent 905122c864
commit 61eb0d1551
1 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
USE `vn`;
DROP procedure IF EXISTS `itemLastEntries`;
DELIMITER $$
USE `vn`$$
CREATE DEFINER=`root`@`%` PROCEDURE `itemLastEntries`(vItem INT, vDays DATE) CREATE DEFINER=`root`@`%` PROCEDURE `itemLastEntries`(vItem INT, vDays DATE)
BEGIN BEGIN
SELECT SELECT
@ -28,4 +33,8 @@ FROM itemType it
LEFT JOIN edi.ekt ek ON b.ektFk = ek.id LEFT JOIN edi.ekt ek ON b.ektFk = ek.id
WHERE b.itemFk = vItem And tr.shipped BETWEEN vDays AND CURDATE() WHERE b.itemFk = vItem And tr.shipped BETWEEN vDays AND CURDATE()
ORDER BY tr.landed DESC , b.id DESC; ORDER BY tr.landed DESC , b.id DESC;
END
END$$
DELIMITER ;