tdate,st,et是从上页取出的值
test是数据库
我觉得逻辑没有错误,但是运行就提示缺少then
if et>20:30 then
if st>20:30 then
set rs1=Con.Execute("insert into test values ('"& tdate &"','"& st &"','"& et &"')")
end if
if st>=18:30 and st<20:30 then
set rs2=Con.Execute("insert into test values ('"& tdate &"','"& st &"','20:30')")
set rs3=Con.Execute("insert into test values ('"& tdate &"','20:30','"& et &"')")
end if
if st>13:30 and st<18:30 then
set rs4=Con.Execute("insert into test values ('"& tdate &"','"& st &"','18:30')")
set rs2=Con.Execute("insert into test values ('"& tdate &"','18:30','20:30')")
set rs3=Con.Execute("insert into test values ('"& tdate &"','20:30','"& et &"')")
end if
if st>08:00 and st<13:30 then
set rs5=Con.Execute("insert into test values ('"& tdate &"','"& st &"','12:00')")
set rs4=Con.Execute("insert into test values ('"& tdate &"','13:30','18:30')")
set rs2=Con.Execute("insert into test values ('"& tdate &"','18:30','20:30')")
set rs3=Con.Execute("insert into test values ('"& tdate &"','20:30','"& et &"')")
end if
if st<08:00 then
set rs6=Con.Execute("insert into test values ('"& tdate &"','"& st &"','08:00')")
set rs5=Con.Execute("insert into test values ('"& tdate &"','08:00','12:00')")
set rs4=Con.Execute("insert into test values ('"& tdate &"','13:30','18:30')")
set rs2=Con.Execute("insert into test values ('"& tdate &"','18:30','20:30')")
set rs3=Con.Execute("insert into test values ('"& tdate &"','20:30','"& et &"')")
end if
end if
if et<=20:30 and et>18:30
if st>=18:30 then
set rs1=Con.Execute("insert into test values ('"& tdate &"','"& st &"','"& et &"')")
end if
if st>13:30 and st<18:30 then
set rs7=Con.Execute("insert into test values ('"& tdate &"','"& st &"','18:30')")
set rs8=Con.Execute("insert into test values ('"& tdate &"','18:30','"& et &"')")
end if
if st>08:00 and st<13:30 then
set rs5=Con.Execute("insert into test values ('"& tdate &"','"& st &"','12:00')")
set rs4=Con.Execute("insert into test values ('"& tdate &"','13:30','18:30')")
set rs8=Con.Execute("insert into test values ('"& tdate &"','18:30','"& et &"')")
end if
if st<08:00 then
set rs6=Con.Execute("insert into test values ('"& tdate &"','"& st &"','08:00')")
set rs5=Con.Execute("insert into test values ('"& tdate &"','08:00','12:00')")
set rs4=Con.Execute("insert into test values ('"& tdate &"','13:30','18:30')")
set rs8=Con.Execute("insert into test values ('"& tdate &"','18:30','"& et &"')")
end if
end if
if et<=17:30 and et>12:00 then
if st>=13:30 then
set rs1=Con.Execute("insert into test values ('"& tdate &"','"& st &"','"& et &"')")
end if
if st>08:00 and st<13:30 then
set rs5=Con.Execute("insert into test values ('"& tdate &"','"& st &"','12:00')")
set rs9=Con.Execute("insert into test values ('"& tdate &"','13:30','"& et &"')")
end if
if st<08:00 then
set rs6=Con.Execute("insert into test values ('"& tdate &"','"& st &"','08:00')")
set rs5=Con.Execute("insert into test values ('"& tdate &"','08:00','12:00')")
set rs9=Con.Execute("insert into test values ('"& tdate &"','13:30','"& et &"')")
end if
end if
if et<=12:00 and et>08:00 then
if st>=08:00 then
set rs1=Con.Execute("insert into test values ('"& tdate &"','"& st &"','"& et &"')")
end if
if st<08:00 then
set rs6=Con.Execute("insert into test values ('"& tdate &"','"& st &"','08:00')")
set rs10=Con.Execute("insert into test values ('"& tdate &"','08:00','"& et &"')")
end if
end if
if et<=08:00 then
set rs1=Con.Execute("insert into test values ('"& tdate &"','"& st &"','"& et &"')")
end if