You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BEGIN
DECLARE done INT DEFAULT FALSE;
DECLARE v_id INT;
DECLARE v_ret INT;
DECLARE cur CURSOR FOR SELECT u.user_id FROM kid_users u WHERE u.latest_login_time>=DATE(DATE_ADD(NOW(),INTERVAL -1 DAY)) AND EXISTS(SELECT * FROM kid_child_info WHERE user_id=u.user_id AND gender IN(0,1)) ORDER BY u.latest_login_time DESC;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
OPEN cur;
read_loop: LOOP
FETCH cur INTO v_id;
IF done THEN
LEAVE read_loop;
END IF;
SET v_ret=redis_command_v2('LPUSH', 'calcReadingRecommendForYou', CONCAT(v_id));
END LOOP;
CLOSE cur;
END
The text was updated successfully, but these errors were encountered:
BEGIN
DECLARE done INT DEFAULT FALSE;
DECLARE v_id INT;
DECLARE v_ret INT;
DECLARE cur CURSOR FOR SELECT u.user_id FROM kid_users u WHERE u.latest_login_time>=DATE(DATE_ADD(NOW(),INTERVAL -1 DAY)) AND EXISTS(SELECT * FROM kid_child_info WHERE user_id=u.user_id AND gender IN(0,1)) ORDER BY u.latest_login_time DESC;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
END
The text was updated successfully, but these errors were encountered: