I have a loop where the code loops and in every loop it connects to different server and then makes MySQL query. However sometimes one of the loops/queries cannot reach to the end and all the code breaks. Is there a way where if the loop gives error then skip the processes / move to next loop?
4条回答 默认 最新
douhuanglou1445 2011-08-18 06:24关注As stated in the comments above, the correct way to do this is within a
try...catchblock.To learn more about these, you can read about them here.
Thanks @Paul.
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报