|
|
|
|
俵ÀÌ / 2000-05-22 / ¿ÀÈÄ 12:59:32 / 203.255.3.190
Á¶È¸¼ö : 114
|
[Áú¹®] ¿¡·¯¹ß»ýÀ» ÇØ°áÇÏ°í ½Í¾î¿ä< |
> <%@ LANGUAGE="VBSCRIPT" %>
> <%
> Response.Buffer=True
> Response.Expires = 0
> Response.AddHeader"Pragma","no-cache"
> name=Trim(Request("name"))
> number=Request("number")
> id = session("id")
>
> pc=10
> rc=20
> setsize = pc
> pgsize = rc
>
> if Request.QueryString("page")="" then '³Ñ°Ü¹Þ´Â º¯¼ö´Â ÆäÀÌÁö °ª¸¸
> page=1
> startpage=1
> else
> page=cint(Request("page"))
> startpage=int(page/setsize)
>
> if startpage=(page/setsize) then
> startpage=page-setsize + 1
> else
> startpage=int(page/setsize)*setsize + 1
> end if
> end if
>
> Set DbCon = Server.CreateObject("ADODB.Connection")
> DbCon.Open "xxx", "xxx", "xxxx"
>
> Set DbRec=Server.CreateObject("ADODB.Recordset")
> DbRec.CursorType=1
>
> dim tn,pgcount
>
> sqltc="Select Count(number) as tn From "&name
> Set rstc=DbCon.Execute(sqltc)
> tn=rstc(0)
> rstc.close
> set rstc=nothing
>
> pgcount=int(tn/pgsize)
> If pgcount*pgsize <> tn Then
> pgcount=pgcount+1
> End if
>
> listsql="SELECT Top "&pgsize*page&" number,subject,writer,visited,date,substring(content,1,150) as content,size=(datalength(content))+1 FROM " & name& " order by number desc"
> DbRec.Open listsql, DbCon
>
> ------------------------
> ¹Ù·ÎÀ§ listsql="SELECT Top "&pgsize*page&" ¶óÀο¡¼ ¹®Á¦°¡ ¹ß»ýÇÕ´Ï´Ù
> ¹«½¼ ÀÌÀ¯ÀÎÁö ¾ËÁú ¸øÇÏ°Ú½À´Ï´Ù
>
-----------------------------------------------------------
Ȥ½Ã DB¸¦ ¾×¼¼½º¸¦ »ç¿ëÇϽÃÁö ¾Ê³ª¿ä?
¾×¼¼½º 97ÀÇ °æ¿ì¿¡´Â Top¸¦ Áö¿øÇÏÁö ¾Ê´Â°É·Î ¾Ë°í ÀÖ½À´Ï´Ù.
´ë½Å ¾×¼¼½º 2000ÀÇ °æ¿ì¿¡´Â Áö¿øÇÑ´Ù°í ÇÏ´õ±º¿ä...
¼Ò½º»ó¿£ º° ¹®Á¦°¡ ¾ø´Â°Í °°½À´Ï´Ù.
±×·³...
|
|
|
|