In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the application of Mysql closed order stored procedure, hoping to supplement and update some knowledge for you. If you have any other questions you need to know, you can continue to follow my updated article in the industry information.
Close the order stored procedure
Begin
Declare done int default 0
Declare orderid varchar (22)
# declare the cursor that queries the order
Declare cur cursor for select orders.order_id from orders where orders.order_state = 'wait_pay'
# exception handling
Declare continue handler for sqlstate '02000' set done = 1
# Open the cursor
Open cur
# traversing data
Fetch next from cur into orderid
Repeat
If not done then
# query the order issuing time according to the order number
Select orders.order_xiatime into @ a from orders where order_id=orderid
# get the time after 1 day according to the time of placing the order (one day first, change it to 12 hours after normal use of the stored procedure)
SELECT ADDDATE (@ a, INTERVAL 24 Hour) into @ b
# judge whether the member has not done any processing within 1 day
If @ b
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.