|
|
|
@ -57,7 +57,6 @@ namespace :subjects do
|
|
|
|
|
str << ("(#{subject.id}, #{key[:school_id]}, '#{key[:school_name]}', #{key[:course_count]}, " +
|
|
|
|
|
"#{key[:student_count]}, #{key[:choice_shixun_num]}, #{key[:choice_shixun_frequency]}, " +
|
|
|
|
|
"'#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}', '#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}')")
|
|
|
|
|
puts "str: #{str}"
|
|
|
|
|
if str.size == 1000
|
|
|
|
|
sql = "REPLACE INTO subject_course_records(#{column_value}) VALUES #{str.uniq.join(",")}"
|
|
|
|
|
str_c = str
|
|
|
|
|