<%@ LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> Untitled Document <% Dim sConnection1 sConnection1 = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=solo; UID=root;PASSWORD=admin; OPTION=3" Set objConn1 = Server.CreateObject("ADODB.Connection") Set rs1 = Server.CreateObject("ADODB.RecordSet") objConn1.Open(sConnection1) cday=WeekdayName(weekday(date)) ctime=FormatDateTime(now(),vbshorttime) ctime=replace(ctime,":",".") response.write(ctime) sql2="select count(*) as cnt from info where start_time <='"+ctime+"' and end_time >='"+ctime+"' and day='"+cday+"' and hall='A1A2'" sql3="select * from info where start_time <='"+ctime+"' and end_time >='"+ctime+"' and day='"+cday+"' and hall='A1A2'" Set rs1=objConn1.Execute(sql2) 'response.Write("
"&sql2) numrec=rs1("cnt") numrec=cint(numrec) response.write ("count is "&numrec+1) Set rs1=objConn1.Execute(sql3) if not rs1.EOF then response.write rs1("course_name") response.write rs1("course_code") Else response.write("no records") End If %>