|
|
|
Home
> Q & A |
|
|
|
<%
call db_conn()
call rs_conn()
dim pagesize, pg, sq1, totalpage, finder1, finder2, job
'º¯¼ö ¼³¸í
'pagesize : ÇÑÆäÀÌÁö¿¡ º¸¿©Áö´Â ¸®½ºÆ® °¹¼ö
'pg : ÆäÀÌÁö ¹øÈ£
'sq1 : Äõ¸®¹®
'totalpage : Àüü ÆäÀÌÁö °¹¼ö
'finder1 : °Ë»öÀÇ Á¾·ù(1 : Á¦¸ñ, 2 : ³»¿ë)
'finder2 : °Ë»ö¾î
if not trim(request("pg"))="" and request("pg")<>cstr(0) then
pg=request("pg")
else
pg=1
end if
finder1 = request("finder1")
finder2 = request("finder2")
job = request("job")
if job = "" then
job = 1
end if
if finder2 <> "" then
'°Ë»öÄõ¸®
select case finder1
case 1
sq1 = "select * from tb_board where subject like '%"+finder2+"%' and view_yn=1"
case 2
sq1 = "select * from tb_board where content like '%"+finder2+"%' and view_yn=1"
case 3
sq1 = "select * from tb_board where username like '%"+finder2+"%' and view_yn=1"
end select
else
'°Ë»ö ¾øÀ»½Ã Äõ¸®
sq1 = "select * from tb_board where view_yn=1"
end if
sq1 = sq1 & " and job = " & job & " order by ref desc, re_step asc"
pagesize=15
rs.PageSize = pagesize
rs.Open sq1, dbconn, 1
if not rs.eof then
rs.AbsolutePage = cint(pg)
totalpage=rs.PageCount
end if
%>
|
|
|
|
|
|
|