<%Option Explicit%> <% Dim page Dim search Dim searchstring Dim sql Dim result Dim totalpage Dim recordcount Dim i Dim wid Dim j Dim subject Dim wname Dim blockpage If Request("page") = "" Then page = 1 Else page = Request("page") End if If Request("search") <> "" Then search = Request("search") searchstring = Request("searchstring") sql = "SELECT num,wname,subject,content,date,visit FROM sinsungnotice WHERE "&search&" LIKE '%"&searchstring&"%' ORDER BY num DESC" Else sql = "SELECT num,wname,subject,content,date,visit FROM sinsungnotice ORDER BY num DESC" End If Set result = Server.CreateObject("ADODB.RecordSet") result.pagesize = 4 result.open sql,conn,adOpenStatic totalpage = result.Pagecount If totalpage = 0 Then totalpage = 1 %> (주)신성H.S
<% result.close Set result = Nothing conn.close Set conn = Nothing %>