sql1=" UPDATE user_red_info_" sql2=" SET status = '#{status}', update_time = '#{update_time}' WHERE red_program_id ='#{red_program_id}'" sql="" i = 0 until i == 100 do if i<10 sql = "#{sql1}0#{i.to_s}#{sql2}" else sql = "#{sql1}#{i.to_s}#{sql2}" end CaiQiuService::Base.DB_RED[sql].update i += 1 end
请发表评论