0
select id as ids from challenges where expire_date > today
我需要環路她乘ID,如(在PHP的foreach)
創建存儲過程的多個更新查詢
foreach (ids)
update challenges set status = 'expired' where id = ids
update user_challenge set challenge_status = 'Expired' where challenge_status = 'Pending' and challenge_id = ids
update user_challenge set challenge_status = 'Failed' where challenge_status = 'Accepted' and challenge_id = ids
end for each;
誰能請創建存儲過程或執行該單號查詢,謝謝
@Abeer拉扎它有幫助嗎?你的問題需要更多幫助嗎? – peterm 2013-03-25 00:20:30