Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,038

HOME > ASP > ASP Forum > เกี่ยวกับการแสดงหน้าแต่ละหน้า และคำสั่ง absolutepage


 

[ASP] เกี่ยวกับการแสดงหน้าแต่ละหน้า และคำสั่ง absolutepage

 
Topic : 033634

Guest



ตัวอย่างโค้ด

' =====================================begin runtime code


Code (ASP)
001.PageSize=10 'กำหนดการแสดงผลต่อ 1 หน้า
002.if Request.QueryString("PageNo")="" then
003.PageNo=1 'ถ้าไม่มีการระบุหน้าเลขหน้า กำหนดให้เป็นหน้า 1
004.else
005.PageNo=Request.QueryString("PageNo") 'ตัวแปรระบุตำแหน่งหน้ารับค่าที่ส่งมา
006.end if
007. 
008. 
009.                Set rs = Server.CreateObject("ADODB.Recordset")
010.                rs_SQL = xsql
011.                rs.Open rs_SQL,Conn,1,1
012. 
013.rs.PageSize=PageSize 'กำหนดขนาดการอ่านข้อมูลต่อ 1 หน้า
014.PageCount=rs.PageCount 'นับจำนวนหน้าที่แบ่งแล้วทั้งหมด
015.'rs.AbsolutePage=PageNo 'กำหนดให้ Rs เปิดข้อมูลจาก
016.%>  
017.     
018.<table width = "677" border = 0 align="center" cellpadding = 1 cellspacing = 0 bgcolor = "#000000">
019.<tr bgcolor = "#FFFFFF">
020.<td align = "center"><font color = "#000000" face = "Microsoft Sans Serif" size = 2>มีทั้งหมด
021.&nbsp; &nbsp;&nbsp;<%=rs.PageCount%> &nbsp;&nbsp;หน้า</font></td>
022.<td align = "center"><font color = "#000000" face = "Microsoft Sans Serif" size = 2>หน้าที่
023.&nbsp; &nbsp;&nbsp;<%=pageno%></font></td>
024.<td align = "center"><font color = "#000000" face = "Microsoft Sans Serif" size = 2>จาก
025.&nbsp; &nbsp;&nbsp;<%=rs.PageCount%>&nbsp;&nbsp;หน้า</font></td>
026. 
027.</table>                             
028.     
029.   
030.<div align="center"><br>
031. 
032.<a href="result.asp?pageNo=1">หน้าแรก</a> &nbsp; <a href="result.asp?pageNo=<%=pageNo-1%>">ย้อนกลับ</a>
033.&nbsp;
034.<% if cint(pageno) < pagecount then %>
035.<a href="result.asp?pageNo=<%=pageNo+1%>">หน้าต่อไป</a>&nbsp; <a href="result.asp?pageNo=<%=pagecount%>">หน้าสุดท้าย</a>
036.&nbsp;
037.<% end if
038. 
039. 
040.%>
041.  &nbsp; </div>
042. 
043.<table width="300%" border="1" cellpadding="1" cellspacing="0" bordercolor="#000000" >
044.  <tbody>
045.    <tr  bgcolor="#999999" bordercolor="black" style="color:Black;background-color:Silver;" >
046.      <td width="2%"><div align="center"><strong><font size="1">DOC ID<%=xSearch%></font></strong></div></td>
047.      <td width="2%"><div align="center"><strong><font size="1">DOC TYPE</font></strong></div></td>
048.      <td width="3%"><div align="center"><strong><font size="1">SUBTYPE </font></strong></div></td>
049.      <td width="3%"><div align="center"><strong><font size="1">SUBSUBTYPE</font></strong></div></td>
050.      <td width="5%"><div align="center"><strong><font size="1">PROJECT</font></strong></div></td>
051.      <td width="3%"><div align="center"><strong><font size="1">CREATOR</font></strong></div></td>
052.      <td width="4%"><div align="center"><strong><font size="1">VENDOR</font></strong></div></td>
053.      <td width="4%"><div align="center"><strong><font size="1">DOC NUMBER</font></strong></div></td>
054.      <td width="13%"><div align="center"><strong><font size="1">TITLE</font></strong></div></td>
055.      <td width="4%"><div align="center"><strong><font size="1">DOC DATE </font></strong></div></td>
056.      <td width="2%"><div align="center"><strong><font size="1">FILE TYPE</font></strong></div></td>
057.      <td width="4%"><div align="center"><strong><font size="1">SOURCE_COMP</font></strong></div></td>
058.      <td width="2%"><div align="center"><strong><font size="1">SOURCE LOGIN</font></strong></div></td>
059.      <td width="5%"><div align="center"><strong><font size="1">SOURCE_PATH</font></strong></div></td>
060.      <td width="6%"><div align="center"><strong><font size="1">SOURCE FILE</font></strong></div></td>
061.      <td width="3%"><div align="center"><strong><font size="1">UPLOAD_ BY</font></strong></div></td>
062.      <td width="4%"><div align="center"><strong><font size="1">UPLOAD_ ON</font></strong></div></td>
063.      <td width="3%"><div align="center"><strong><font size="1">UPDATE_ BY</font></strong></div></td>
064.      <td width="4%"><div align="center"><strong><font size="1">UPDATE_ ON</font></strong></div></td>
065.      <td width="1%"><div align="center"><strong><font size="1">INUSE</font></strong></div></td>
066.</td>
067.</tr>
068.<%
069.if rs.eof <> true then
070.rs.movefirst
071.Rs.PageSize=PageSize 'กำหนดขนาดการอ่านข้อมูลต่อ 1 หน้า
072.PageCount=Rs.PageCount 'นับจำนวนหน้าที่แบ่งแล้วทั้งหมด
073.Rs.AbsolutePage=PageNo 'กำหนดให้ Rs เปิดข้อมูลจาก
074. 
075.id=1
076.Do while not rs.eof and ID<=PageSize
077.pa=PageNo-1
078.pz=pa*PageSize
079.cnt=pz+id
080.%>
081.</table>
082.<table width="300%" border="1" cellpadding="1" cellspacing="0" bordercolor="#000000" >
083.  <tbody>
084.    <tr  bgcolor="#999999" bordercolor="black" style="color:Black;background-color:Silver;" >
085.      <td width="2%"><div align="center"><a href="search2.asp?x2=<%=rs("Doc_type")%>&x3=<%=rs("Sub_type")%>&x4=<%=rs("Subsub_type")%>&x5=<%=rs("project")%>&x6=<%=rs("Creator")%>&x7=<%=rs("Vendor")%>&x8=<%=rs("doc_number")%>&x9=<%=rs("Title")%>&x10=<%=rs("Doc_date")%>&x11=<%=rs("doc_id")%>"  target="_parent" > <font size="2">
086.        <%=rs("doc_id")%></font></a></div></td>
087.      <td width="3%"><div align="center"><font size="2"><%=rs("doc_type")%></font></div></td>
088.      <% if  rs("sub_type")  <>"" then %>
089. 
090.      <td width="1%"><font size="2"><%= rs("sub_type")%></font></td>
091.            <%else %>
092.    <td width="0%"><font size="2">&nbsp;</font></td>
093.      <%end if%>
094.      <% if  rs("subsub_type")  <>"" then %>
095.      <td width="1%"><font size="2"><%= rs("subsub_type")%></font></td>
096.            <%else %>
097.      <td width="0%"><font size="2">&nbsp;</font></td>
098.      <%end if%>
099.      <% if  rs("project")  <>"" then %>
100.      <td width="1%"><font size="2"><%= rs("project")%></font></td>
101.            <%else %>
102.      <td width="1%"><font size="2">&nbsp;</font></td>
103.      <%end if%>
104.      <% if  rs("creator")  <>"" then %>
105.      <td width="1%"><font size="2"><%= rs("creator")%></font></td>
106.            <%else %>
107.      <td width="0%"><font size="2">&nbsp;</font></td>
108.      <%end if%>
109.      <% if  rs("vendor")  <>"" then %>
110.      <td width="1%"><font size="2"><%= rs("vendor")%></font></td>
111.            <%else %>
112.      <td width="0%"><font size="2">&nbsp;</font></td>
113.      <%end if%>
114.      <td width="1%"><font size="2"><%= rs("doc_number")%></font></td>
115.      <td width="4%"><font size="2"><%= rs("title")%></font></td>
116.      <td width="1%"><font size="2"><%= rs("doc_date")%></font></td>
117.      <td width="1%"><div align="center"><font size="2"><%= rs("file_type")%></font></div></td>
118.      <td width="1%"><font size="2"><%= rs("source_comp")%></font></td>
119.      <td width="1%"><font size="2"><%= rs("source_login")%></font></div></td>
120.      <td width="1%"><font size="2"><%= rs("source_path")%></font></td>
121.      <td width="1%"><font size="2"><%= rs("source_file")%></font></td>
122.      <td width="1%"><div align="center"><font size="2"><%= rs("upload_by")%></font></div></td>
123.      <td width="1%"><div align="center"><font size="2"><%= rs("upload_on")%></font></div></td>
124.      <td width="1%"><div align="center"><font size="2"><%= rs("update_by")%></font></div></td>
125.      <td width="37%"><font size="2"><%= rs("update_on")%></font></td>
126.      <td width="38%"><div align="center"><font size="2"><%= rs("inuse")%></font></div></td>
127.</tr>
128.<%
129.rs.movenext
130.id =id+1
131.Loop
132.%>
133.</table>
134. 
135.<%
136.end if
137.rs.close
138.adoDoc.close
139.%>


ปัญหาก็คือ

1.ใช้คำสั่ง absolutepageไม่ได้ ถ้าจะ กด f12เพื่อรันดูจะฟ้อง
แบบนี้

Error Type:
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/e-lib/DL20091029 ext tab/result.asp, line 113

2.ตอนที่ remark ปิดคำสั่ง absolutepage ไว้สามารถทดสอบรันดูได้
แต่ปัญหาอีกอย่างก็คือ จะกดดูที่หน้าอื่นๆไม่ได้ (หน้าต่อไปของข้อมูลที่กำหนดขอบเขตไว้)

ลองแก้ปัญหาของ absolutepage ที่มีคนแนะนำมาว่า เปลี่ยน จาก 1,3 เป็น Set rs = Server.CreateObject("ADODB.Recordset")
rs_SQL = xsql
rs.Open rs_SQL,Conn,1,1
ก็ไม่ได้

รบกวนช่วยดูโค้ดและแนะนำทางออกให้ที
งมโข่งมาหลายวันแล้วกับเรื่องนี้
ขอบคุณมากๆค่ะ



Tag : - - - -

Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2009-10-29 09:55:34 By : poyz-say-hi View : 1634 Reply : 12
 

 

No. 1



โพสกระทู้ ( 74,059 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

Code (ASP)
1.if rs.eof <> true then
2. 
3.เป็น
4. 
5.IF NOT rs.EOF Then

Date : 2009-10-29 10:01:30 By : webmaster
 

 

No. 2



โพสกระทู้ ( 74,059 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

Code (ASP)
01.<% Option Explicit %>
02.<html>
03.<head>
04.<title>ThaiCreate.Com ASP & Microsoft Access Tutorial</title>
05.</head>
06.<body>
07.<%
08.    Dim Conn,strSQL,objRec
09.    Set Conn = Server.Createobject("ADODB.Connection")
10.    Conn.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("mydatabase.mdb"),"" , ""
11.    strSQL = "SELECT * FROM customer "
12.    Set objRec = Server.CreateObject("ADODB.Recordset")
13.    objRec.Open strSQL, Conn, 1,3
14. 
15.    If objRec.EOF Then
16.        Response.write (" Not found record.")  
17.    Else
18. 
19.    Dim PageLen,PageNo,TotalRecord,TotalPage,No,intID
20.    PageLen = 2
21.    PageNo = Request.QueryString("Page")
22.    if PageNo = "" Then PageNo = 1
23.    TotalRecord = objRec.RecordCount
24.    objRec.PageSize = PageLen
25.    TotalPage = objRec.PageCount
26.    objRec.AbsolutePage = PageNo
27.%>
28.<table width="600" border="1">
29.  <tr>
30.    <th width="91"> <div align="center">CustomerID </div></th>
31.    <th width="98"> <div align="center">Name </div></th>
32.    <th width="198"> <div align="center">Email </div></th>
33.    <th width="97"> <div align="center">CountryCode </div></th>
34.    <th width="59"> <div align="center">Budget </div></th>
35.    <th width="71"> <div align="center">Used </div></th>
36.  </tr>
37.<%
38.    No=1
39.    Do While Not objRec.EOF and No <= PageLen
40.%>
41.      <tr>
42.        <td><div align="center"><%=objRec.Fields("CustomerID").Value%></div></td>
43.        <td><%=objRec.Fields("Name").Value%></td>
44.        <td><%=objRec.Fields("Email").Value%></td>
45.        <td><div align="center"><%=objRec.Fields("CountryCode").Value%></div></td>
46.        <td align="right"><%=objRec.Fields("Budget").Value%></td>
47.        <td align="right"><%=objRec.Fields("Used").Value%></td>
48.      </tr>
49.<%
50.    No = No + 1
51.    objRec.MoveNext
52.    Loop
53.%>
54.</table>
55.    Total : <%=TotalRecord%>  Page <%=PageNo%> All Page <%=TotalPage%>
56.    <% IF Cint(PageNo) > 1 then %>
57.    <a href="<%Request.ServerVariables("SCRIPT_NAME")%>?Page=1"><< First</a>
58.    <a href="<%Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=PageNo-1%>">< Back</a>
59.    <% End IF%>
60.    <% IF Cint(PageNo) < TotalPage Then %>
61.    <a href="<%Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=PageNo+1%>">Next ></a>
62.    <a href="<%Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=TotalPage%>">Last >></a>
63.    <% End IF%>
64.    <br>
65.    Go to
66.    <% For intID = 1 To TotalPage%>
67.    <% if intID = Cint(PageNo) Then%>
68.    <b><%=intID%></b>
69.    <%Else%>
70.    <a href="<%Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=intID%>"><%=intID%></a>
71.    <%End IF%>
72.    <%Next%>
73.<%
74.End IF
75.objRec.Close()
76.Conn.Close()
77.Set objRec = Nothing
78.Set Conn = Nothing
79.%>
80.</body>
81.</html>


Ref : ASP Microsoft Access List Record Paging/Pagination
Date : 2009-10-29 10:03:32 By : webmaster
 

 

No. 3

Guest


ขอรบกวนอีกรอบค่ะพี่
ตอนนี้เอาตัวอย่างที่ให้มามาลองใช้ดูแล้วโค้ดมันออกมาเป็นแบบนี้ค่ะ

Code (ASP)
001.Dim adoDoc,rs_SQL,rs        '   Dim Conn,strSQL,objRec
002. 
003.                Set rs = Server.CreateObject("ADODB.Recordset")
004.                rs_SQL = xsql
005.                rs.Open rs_SQL,Conn,1,1
006. 
007.    If rs.EOF Then
008.   
009.Response.write (" Not found record.")    
010.    Else           
011.                 
012.Dim PageLen,PageNo,TotalRecord,TotalPage,No,intID
013. 
014.PageLen = 10  ' กำหนดว่าจะให้แสดงหน้าละกี่รายการ
015.PageNo = Request.QueryString("Page")           
016. 
017.if PageNo = "" Then PageNo = 1
018.     
019.TotalRecord = rs.RecordCount
020.rs.PageSize = PageLen 
021.TotalPage = rs.PageCount
022.rs.AbsolutePage = PageNo
023.%>              
024. 
025.<table width="300%" border="1" cellpadding="1" cellspacing="0" bordercolor="#000000" >
026.  <tbody>
027.    <tr  bgcolor="#999999" bordercolor="black" style="color:Black;background-color:Silver;" >
028.      <td width="2%"><div align="center"><strong><font size="1">DOC ID<%=xSearch%></font></strong></div></td>
029.      <td width="2%"><div align="center"><strong><font size="1">DOC TYPE<%=xDate1%></font></strong></div></td>
030.      <td width="3%"><div align="center"><strong><font size="1">SUBTYPE </font></strong></div></td>
031.      <td width="3%"><div align="center"><strong><font size="1">SUBSUBTYPE</font></strong></div></td>
032.      <td width="5%"><div align="center"><strong><font size="1">PROJECT</font></strong></div></td>
033.      <td width="3%"><div align="center"><strong><font size="1">CREATOR</font></strong></div></td>
034.      <td width="4%"><div align="center"><strong><font size="1">VENDOR</font></strong></div></td>
035.      <td width="4%"><div align="center"><strong><font size="1">DOC NUMBER</font></strong></div></td>
036.      <td width="13%"><div align="center"><strong><font size="1">TITLE</font></strong></div></td>
037.      <td width="4%"><div align="center"><strong><font size="1">DOC DATE </font></strong></div></td>
038.      <td width="2%"><div align="center"><strong><font size="1">FILE TYPE</font></strong></div></td>
039.      <td width="4%"><div align="center"><strong><font size="1">SOURCE_COMP</font></strong></div></td>
040.      <td width="2%"><div align="center"><strong><font size="1">SOURCE LOGIN</font></strong></div></td>
041.      <td width="5%"><div align="center"><strong><font size="1">SOURCE_PATH</font></strong></div></td>
042.      <td width="6%"><div align="center"><strong><font size="1">SOURCE FILE</font></strong></div></td>
043.      <td width="3%"><div align="center"><strong><font size="1">UPLOAD_ BY</font></strong></div></td>
044.      <td width="4%"><div align="center"><strong><font size="1">UPLOAD_ ON</font></strong></div></td>
045.      <td width="3%"><div align="center"><strong><font size="1">UPDATE_ BY</font></strong></div></td>
046.      <td width="4%"><div align="center"><strong><font size="1">UPDATE_ ON</font></strong></div></td>
047.      <td width="1%"><div align="center"><strong><font size="1">INUSE</font></strong></div></td>
048.    </tr>
049.     
050.<% No=1
051.   
052.Do While Not rs.EOF and No <= PageLen  %>
053.    <tr>
054.      <td ><div align="center"><a href="search2.asp?x2=<%=rs("Doc_type")%>&x3=<%=rs("Sub_type")%>&x4=<%=rs("Subsub_type")%>&x5=<%=rs("project")%>&x6=<%=rs("Creator")%>&x7=<%=rs("Vendor")%>&x8=<%=rs("doc_number")%>&x9=<%=rs("Title")%>&x10=<%=rs("Doc_date")%>&x11=<%=rs("doc_id")%>"  target="_parent" >
055.        <%=rs.fields("doc_id").value%></a></div></td>
056.      <td><div align="center"><font size="2"><%=rs.fields("doc_type").value%></font></div></td>
057.      <% if  rs("sub_type")  <>"" then %>
058.      <td ><font size="2"><%= rs.fields("sub_type").value%></font></td>
059.      <%else%>
060.      <td><font size="2">&nbsp;</font></td>
061.      <%end if%>
062.      <% if  rs("subsub_type")<>"" then %>
063.      <td><font size="2"><%= rs("subsub_type")%></font></td>
064.      <%else %>
065.      <td><font size="2">&nbsp;</font></td>
066.      <%end if%>
067.      <% if  rs("project")<>"" then%>
068.      <td><font size="2"><%= rs.fields("project").value%></font></td>
069.      <%else %>
070.      <td><font size="2">&nbsp;</font></td>
071.      <%end if%>
072.      <% if  rs("creator")<>"" then%>
073.      <td><font size="2"><%= rs.fields("creator").value%></font></td>
074.      <%else %>
075.      <td><font size="2">&nbsp;</font></td>
076.      <%end if%>
077.      <% if  rs("vendor")<>"" then%>
078.      <td><font size="2"><%= rs.fields("vendor").value%></font></td>
079.      <%else %>
080.      <td><font size="2">&nbsp;</font></td>
081.      <%end if%>
082.      <td><font size="2"><%= rs.fields("doc_number").value%></font></td>
083.      <td><font size="2"><%= rs.fields("title").value%></font></td>
084.      <td><font size="2"><%= rs.fields("doc_date").value%></font></td>
085.      <td><div align="center"><font size="2"><%= rs.fields("file_type").value%></font></div></td>
086.      <td><font size="2"><%= rs.fields("source_comp").value%></font></td>
087.      <td><div align="center"><font size="2"><%= rs.fields("source_login").value%></font></div></td>
088.      <td><font size="2"><%= rs.fields("source_path").value%></font></td>
089.      <td><font size="2"><%= rs.fields("source_file").value%></font></td>
090.      <td><div align="center"><font size="2"><%= rs.fields("upload_by").value%></font></div></td>
091.      <td><div align="center"><font size="2"><%= rs.fields("upload_on").value%></font></div></td>
092.      <td><div align="center"><font size="2"><%= rs.fields("update_by").value%></font></div></td>
093.      <td><font size="2"><%= rs.fields("update_on").value%></font></td>
094.      <td><div align="center"><font size="2"><%= rs.fields("inuse").value%></font></div></td>
095.    </tr>
096. 
097.<%
098.    
099.No = No + 1
100. 
101.rs.MoveNext
102. 
103.Loop
104.%>
105. 
106.</table>
107. 
108.Total : <%=TotalRecord%>  Page <%=PageNo%> All Page <%=TotalPage%>
109. 
110.<% IF Cint(PageNo) > 1 then %>
111.   
112.<a href="<%Request.ServerVariables("SCRIPT_NAME")%>?Page=1"><< First</a> 
113.  
114.<a href="<%Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=PageNo-1%>">< Back</a>
115. 
116.<% End IF%>
117. 
118.<% IF Cint(PageNo) < TotalPage Then %>
119.   
120.<a href="<%Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=PageNo+1%>">Next ></a> 
121.   
122.<a href="<%Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=TotalPage%>">Last >></a>
123.  
124.<% End IF%>
125.   
126.<br>
127.  
128.Go to
129. 
130.<% For intID = 1 To TotalPage%>
131. 
132.<% if intID = Cint(PageNo) Then%>
133.    
134.<b><%=intID%></b>
135.   
136.<%Else%>
137. 
138.<a href="<%Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=intID%>"><%=intID%></a>
139.    
140.<%End IF%>
141.    
142.<%Next%>
143. 
144.<%
145.End IF
146.rs.Close()
147.adoDoc.Close()
148.Set rs = Nothing
149.Set adoDoc = Nothing
150.%>
151.</body>
152.</html>


ตอนนี้ที่ search ข้อมูลออกมาหน้าแรก
แต่พอกดจะดูหน้าที่ 2 หรือหน้าก่อน หลัง มันจะไป บอกว่า "Not found record. "

ทำไมถึงเป็นอย่างงี้อ่ะพี่
แล้วก็ไม่เข้าใจตรงคำสั่ง
rs.fileds.......value
แล้วก็คำสั่ง

<%Request.ServerVariables("SCRIPT_NAME")%>
ด้วยค่ะ

จากโค้ดที่แก้แล้วผิดตรงไหนอีกรึป่าว ต้องตั้งค่าหรือตัวแปรอะไรอีกไม๊อ่ะ ทำไมมันไม่ได้

จาตายยยอยู่แล้ว รบกวนด้วยนะค่ะ
Date : 2009-10-29 11:28:42 By : poyz-say-hi
 

 

No. 4



โพสกระทู้ ( 74,059 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

xsql คำสั่ง SQL Statement มันคืออะไรครับ
Date : 2009-10-29 11:49:21 By : webmaster
 

 

No. 5

Guest


Code (ASP)
001.<%@LANGUAGE="VBSCRIPT" CODEPAGE="874"%>
002.<%
003.Set adoDoc = Server.CreateObject("ADODB.connection")
004.Conn = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source="  & server.MapPath("zDigitalLibrary.accdb")
005.adoDoc.open Conn
006.%>
007. 
008.<html>
009.<head>
010.<title>Result</title>
011.<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
012.</head>
013. 
014.<body>
015. 
016.<%
017.        xAct= Request.QueryString("x0")
018.        xSearch= Request.QueryString("Search_Act")
019.        xDocType = Request.QueryString("x1")
020.        xSubType = Request.QueryString("x2")
021.        xSubsubType = Request.QueryString("x3")
022.        xProject  = Request.QueryString("x4")
023.        xCreator = Request.QueryString("x5")
024.        xVendor = Request.QueryString("x6")
025.        xDocnumber = Request.QueryString("x7")
026.        xTitle = Request.QueryString("x8")
027.         
028.         
029.        xArea = Request.QueryString("x9")
030.        xUnit = Request.QueryString("x10")
031.        xTagType = Request.QueryString("x11")
032.        xTag = Request.QueryString("x12")
033.        xManuf = Request.QueryString("x13")
034.        xModel = Request.QueryString("x14")
035.         
036.        xDate1 = Request.QueryString("x15")
037.        xDate2 = Request.QueryString("x16")
038.          
039.'        Nrecord = Request.QueryString("x17")
040.         
041.'response.write xArea &" : " & xUnit & " : " & xTagType  & " : " & xTag & " : " & xManuf & " : " & xModel  & " : " & xDoctype& " : " 
042.         
043.     
044. 
045.if xAct <>"" then
046.    xsql = "select a.* "
047.    xsql = xsql & " from s_elib_docmast  a "
048.    If xArea <> "" Or xUnit <> "" Or xTagType <> "" Or xTag <> "" Or xManuf <> "" Or xModel <> "" Then
049.        xsql = xsql & " , s_elib_doclink b "
050.    End If
051.        xsql = xsql & " where a.inuse = 'T' "
052.    If xArea <> "" Or xUnit <> "" Or xTagType <> "" Or xTag <> "" Or xManuf <> "" Or xModel <> "" Then
053.        xsql = xsql & " and b.inuse = 'T' "
054.        xsql = xsql & " and a.doc_id = b.doc_id "
055.        If xArea <> "" Then xsql = xsql & " and b.link_type = 'AREA' and b.link_key = '" & xArea & "' "
056.        If xUnit <> "" Then xsql = xsql & " and b.link_type = 'UNIT' and b.link_key = '" & xUnit & "' "
057.        If xTagType <> "" Then xsql = xsql & " and b.link_type = 'TAG_TYPE' and b.link_key = '" & xTagType & "' "
058.        If xTag <> "" Then xsql = xsql & " and b.link_type = 'TAG' and b.link_key = '" & xTag & "' "
059.        If xManuf <> "" Then xsql = xsql & " and b.link_type = 'MANUF' and b.link_key = '" & xManuf & "' "
060.        If xModel <> "" Then xsql = xsql & " and b.link_type = 'MODEL' and b.link_key = '" & xModel & "' "
061.    End If
062.    If xDocType <> "" Then xsql = xsql & " and a.Doc_Type = '" & xDocType & "' "
063.    If xSubType <> "" Then xsql = xsql & " and a.Sub_Type = '" & xSubType & "' "
064.    If xSubSubType <> "" Then xsql = xsql & " and a.Subsub_Type = '" & xSubSubType & "' "
065.    If xProject <> "" Then xsql = xsql & " and a.Project = '" & xProject & "' "
066.    If xCreator <> "" Then xsql = xsql & " and a.Creator = '" & xCreator & "' "
067.    If xVendor <> "" Then xsql = xsql & " and a.Vendor = '" & xVendor & "' "
068.    If xDocnumber <> "" Then xsql = xsql & " and a.Doc_number = '" & xDocnumber & "' "
069.    If xTitle <> "" Then xsql = xsql & " and a.Title = '" & xTitle & "' "
070.'date
071.''''' Oracle format =======================================================================
072.'    If Text_Date(1).Text <> "" Then
073.'        xsql = xsql & " and trunc(doc_date) >= trunc(to_date('" & Text_Date(1).Text & "','dd-mm-yyyy')) "
074.'    End IfD
075.'        xsql = xsql & " and trunc(doc_date) <= trunc(to_date('" & Text_Date(2).Text & "','dd-mm-yyyy')) "
076.'    End If
077.'''''' Access2007 ========================================================================
078.    If xDate1 <> "" Then xsql = xsql & " and Doc_Date >= Datevalue('" & xDate1 &"')"
079.    If xDate2 <> "" Then xsql = xsql & " and Doc_Date <= Datevalue('" & xDate2 &"')"
080.'    If xDate1 <> "" Then xsql = xsql & " and Doc_Date = '13-10-1988'"
081.'    If xDate2 <> "" Then xsql = xsql & " and Doc_Date <= '" & xDate2 & "' "
082. 
083.'    If xDate1 <> "" Then xsql = xsql & " and format(Doc_Date,'dd-mm-yyyy') >= '" & Format(xDate1, "dd-mm-yyyy") & "' "
084.'    If xDate2 <> "" Then xsql = xsql & " and format(Doc_Date,'dd-mm-yyyy') <= '" & Format(xDate2, "dd-mm-yyyy") & "' "
085. 
086.' ===================================================================================
087.  else
088.     xsql = "select a.* "
089.    xsql = xsql & " from s_elib_docmast  a  where doc_type ='-' "
090. 
091.  end if
092.    xsql = xsql & " Order by  a.doc_id ASC "
093.     
094.' =====================================End  Query ==============================================
095. 
096.ข้างบนเป็นคำสั่ง sql ที่อยู่ในหน้า result.asp ทั้งหมดค่ะ และหน้า result นี้จะแทรกที่คำสั่ง iframe ของหน้า search.asp
097. 
098.ข้างล่างเป็นโค้ดคำสั่งของหน้า search.asp ค่ะ
099. 
100.<%@LANGUAGE="VBSCRIPT" CODEPAGE="874"%>
101. 
102. 
103.<html>
104.<head>
105.<title>search</title>
106.<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
107.</head>
108. 
109.<body    bgcolor="#E4E4E4"
110.<%
111.    xAct =Request.Form("Act")'ตัวแปรเก็บค่าจากตัวเลือกในฟอร์ม
112.    xDoctype = Request.Form("Doc_type")
113.    xSubtype = Request.Form("Subtype")
114.    xSubsubtype = Request.Form("Subsubtype")
115.    xProject = Request.Form("Project")
116.    xCreator = Request.Form("Creator")
117.    xVendor = Request.Form("Vendor")
118.    xDocnumber = Request.Form("Doc_number")
119.    xTitle = Request.Form("Title")
120. 
121.     
122.    xArea = Request.Form("Area")
123.    xUnit = Request.Form("unit")
124.    xTagType = Request.Form("Tagtype")
125.    xTag = Request.Form("Tag")
126.    xManuf = Request.Form("Manuf")
127.    xModel = Request.Form("model")
128.     
129.    xDate1 = Request.Form("Date1")
130.    xDate2 = Request.Form("Date2")
131.     
132. 
133.Set adocon = Server.CreateObject("ADODB.Connection") 'ประกาศตัวแปร adocon เป็นตัวแปร object  connectio จะเรียก ,method open  ที่ใช้ติดต่อฐาน  DigitalLibrary.accdb
134.strCon = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & Server.MapPath("zDigitalLibrary.accdb"'This one is for Access 2000/2002
135. 
136.%>              
137.  <form action="search.asp" method="post" name="search" target="_self" id="search">
138.  <table width="100%" border="0">
139.    <tr>
140.      <td><strong><font size="5"color="#0033FF">Document Search</font></strong>
141.        <hr align="left" color="#333333" size="4" width="50%" > </td>
142.    </tr>
143.  </table>
144.  <table width="100%" border="0">
145.    <tr>
146.      <td><strong> <strong><font color="#5CB900" size="4">Detail</font></strong>
147.        </strong><strong></strong><strong></strong><strong></strong><strong></strong></td>
148.      <td colspan="3">&nbsp;</td>
149.      <td colspan="2"><strong><font color="#5CB900" size="4">Link</font></strong><strong></strong></td>
150.    </tr>
151.    <tr>
152.      <td width="14%"><strong><font size="2">Document Type</font></strong></td>
153.      <td width="20%"> <strong><font color="#0000FF" size="4">
154.        <select style='width=130px' id=Doc_type name=Doc_type >
155.        <option><%=xDoctype%></option>
156.          <%
157.                xsql = "select  distinct(doc_type)  "              
158.                xsql = xsql & " from s_elib_docmast "
159.                xsql = xsql & " order by doc_type "
160.                Set rx = Server.CreateObject("ADODB.Recordset")
161.                rx_SQL = xsql
162.                rx.Open rx_SQL, strCon,1,3
163.                If rx.RecordCount <> 0 Then
164.                rx.MoveFirst
165.                    Do While Not rx.EOF
166.  %>
167.          <option><%=rx("doc_type")%></option>
168.          
169.          <%
170.                        rx.Movenext
171.                    Loop
172.                    rx.close
173.                End if
174.%>
175.           
176.        </select>
177.        </font></strong>&gt;<strong><font color="#0000FF" size="4"> </font></strong></td>
178.      <td width="17%"><select style='width=120px' id=select3 name=subtype >
179.      <option><%=xSubtype%></option>
180.          <%
181.                xsql = "select  distinct(sub_type)  "              
182.                xsql = xsql & " from s_elib_docmast "
183.                xsql = xsql & " order by sub_type "
184.                Set rx = Server.CreateObject("ADODB.Recordset")
185.                rx_SQL = xsql
186.                rx.Open rx_SQL, strCon,1,3
187.                If rx.RecordCount <> 0 Then
188.                rx.MoveFirst
189.                    Do While Not rx.EOF
190.  %>
191.          <option><%=rx("sub_type")%></option>
192.          <%
193.                        rx.Movenext
194.                    Loop
195.                    rx.close
196.                End if
197.%>
198.           
199.        </select> &gt;&gt;</td>
200.      <td width="15%"><select style='width=120px' id=select33  name=Subsubtype >
201.      <option><%=xSubsub_type%></option>
202.          <%
203.                xsql = "select  distinct(Subsub_type)  "               
204.                xsql = xsql & " from s_elib_docmast "
205.                xsql = xsql & " order by Subsub_type "
206.                Set rx = Server.CreateObject("ADODB.Recordset")
207.                rx_SQL = xsql
208.                rx.Open rx_SQL, strCon,1,3
209.                If rx.RecordCount <> 0 Then
210.                rx.MoveFirst
211.                    Do While Not rx.EOF
212.  %>
213.          <option><%=rx("Subsub_type")%></option>
214.          <%
215.                        rx.Movenext
216.                    Loop
217.                    rx.close
218.                End if
219.%>
220.          
221.        </select> <font size="2">&nbsp;</font><font size="2">&nbsp;</font><font size="2">&nbsp;</font><font size="2">&nbsp;</font></td>
222.      <td><font size="2">&nbsp;<strong>Area</strong></font></td>
223.      <td width="22%" colspan="2"><font size="2">
224.        <select style='width=180px' id=select27 name=Area>
225.        <option><%=xArea%></option>
226.          <%
227.                xsql = "select  distinct(link_key)  "              
228.                xsql = xsql & " from s_elib_doclink where inuse ='T' and (link_type = 'AREA' or  link_type is null) "
229.                xsql = xsql & " order by link_key "
230.                Set rx = Server.CreateObject("ADODB.Recordset")
231.                rx_SQL = xsql
232.                rx.Open rx_SQL, strCon,1,3
233.                If rx.RecordCount <> 0 Then
234. 
235.                    Do While Not rx.EOF
236.  %>
237.          <option><%=rx("link_key")%></option>
238.          <%
239.                        rx.Movenext
240.                    Loop
241.                    rx.close
242.                End if
243.%>
244.           
245.        </select>
246.        </font></td>
247.    </tr>
248.    <tr>
249.      <td><strong><font size="2">Project Number</font></strong></td>
250.      <td colspan="3"><select style='width=316px' id=select34 name=Project >
251.      <option><%=xProject%></option>
252.          <%
253.                xsql = "select  distinct(project)  "               
254.                xsql = xsql & " from s_elib_docmast "
255.                xsql = xsql & " order by project "
256.                Set rx = Server.CreateObject("ADODB.Recordset")
257.                rx_SQL = xsql
258.                rx.Open rx_SQL, strCon,1,3
259.                If rx.RecordCount <> 0 Then
260.                rx.MoveFirst
261.                    Do While Not rx.EOF
262.  %>
263.          <option><%=rx("project")%></option>
264.          <%
265.                        rx.Movenext
266.                    Loop
267.                    rx.close
268.                End if
269.%>
270.           
271.        </select> <font size="2">&nbsp;</font><font size="2">&nbsp;</font><font size="2">&nbsp;</font></td>
272.      <td width="12%"><font size="2">&nbsp;<strong>Unit</strong></font></td>
273.      <td colspan="2"><font size="2">
274.        <select style='width=180px' id=select26 name=unit>
275.        <option><%=xUnit%></option>
276.          <%
277.                xsql = "select  distinct(link_key)  "              
278.                xsql = xsql & " from s_elib_doclink where inuse ='T' and (link_type = 'UNIT' or  link_type is null) "
279.                xsql = xsql & " order by link_key "
280.                Set rx = Server.CreateObject("ADODB.Recordset")
281.                rx_SQL = xsql
282.                rx.Open rx_SQL, strCon,1,1
283.                If rx.RecordCount <> 0 Then
284.                rx.MoveFirst
285.                    Do While Not rx.EOF
286.  %>
287.          <option><%=rx("link_key")%></option>
288.          <%
289.                        rx.Movenext
290.                    Loop
291.                    rx.close
292.                End if
293.%>
294.           
295.        </select>
296.        </font></td>
297.    </tr>
298.    <tr>
299.      <td height="29"><strong><font size="2">Creator</font></strong></td>
300.      <td><select style='width=130px' id=Creator name=Creator >
301.          <option><%=xCreator%></option>
302.          <%
303.                xsql = "select  distinct(creator)  "               
304.                xsql = xsql & " from s_elib_docmast "
305.                xsql = xsql & " order by creator "
306.                Set rx = Server.CreateObject("ADODB.Recordset")
307.                rx_SQL = xsql
308.                rx.Open rx_SQL, strCon,1,3
309.                If rx.RecordCount <> 0 Then
310.                rx.MoveFirst
311.                    Do While Not rx.EOF
312.  %>
313.          <option><%=rx("creator")%></option>
314.          <%
315.                        rx.Movenext
316.                    Loop
317.                    rx.close
318.                End if
319.%>
320.           
321.        </select> &gt;</td>
322.      <td colspan="2"><select style='width=120px' id=select18 name=Vendor >
323.      <option><%=xVendor%></option>
324.          <%
325.                xsql = "select  distinct(vendor)  "            
326.                xsql = xsql & " from s_elib_docmast "
327.                xsql = xsql & " order by vendor "
328.                Set rx = Server.CreateObject("ADODB.Recordset")
329.                rx_SQL = xsql
330.                rx.Open rx_SQL, strCon,1,3
331.                If rx.RecordCount <> 0 Then
332.                rx.MoveFirst
333.                    Do While Not rx.EOF
334.  %>
335.          <option><%=rx("vendor")%></option>
336.          <%
337.                        rx.Movenext
338.                    Loop
339.                    rx.close
340.                End if
341.%>
342.        </select> <font size="2">&nbsp;</font><font size="2">&nbsp;</font></td>
343.      <td><font size="2">&nbsp;<strong>Tag type</strong></font></td>
344.      <td colspan="2"><font size="2">
345.        <select style='width=180px' id=select36 name=Tagtype>
346.        <option><%=xTagtype%></option>
347.          <%
348.                xsql = "select  distinct(link_key)  "              
349.                xsql = xsql & " from s_elib_doclink where inuse ='T' and (link_type = 'TAG_TYPE'  or  link_type is null)"
350.                xsql = xsql & " order by link_key "
351.                Set rx = Server.CreateObject("ADODB.Recordset")
352.                rx_SQL = xsql
353.                rx.Open rx_SQL, strCon,1,3
354.                If rx.RecordCount <> 0 Then
355.     
356.                    Do While Not rx.EOF
357.  %>
358.          <option><%=rx("link_key")%></option>
359.          <%
360.                        rx.Movenext
361.                    Loop
362.                    rx.close
363.                End if
364.%>
365.        </select>
366.        </font></td>
367.    </tr>
368.    <tr>
369.      <td><strong><font size="2">Document Number</font></strong></td>
370.      <td colspan="3"><select name=doc_number id=select35 style='width=316px' >
371.          <option><%=xDoc_number%></option>
372.          <%
373.                xsql = "select  distinct(doc_number)  "            
374.                xsql = xsql & " from s_elib_docmast "
375.                xsql = xsql & " order by doc_number "
376.                Set rx = Server.CreateObject("ADODB.Recordset")
377.                rx_SQL = xsql
378.                rx.Open rx_SQL, strCon,1,3
379.                If rx.RecordCount <> 0 Then
380.                rx.MoveFirst
381.                    Do While Not rx.EOF
382.  %>
383.          <option><%=rx("doc_number")%></option>
384.          <%
385.                        rx.Movenext
386.                    Loop
387.                    rx.close
388.                End if
389.%>
390.           
391.        </select> <font size="2">&nbsp;</font><font size="2">&nbsp;</font></td>
392.      <td><font size="2">&nbsp;<strong>Tag</strong></font></td>
393.      <td colspan="2"><font size="2">
394.        <select style='width=180px' id=select29 name=Tag>
395.        <option><%=xTag%></option>
396.          <%
397.                xsql = "select  distinct(link_key)  "              
398.                xsql = xsql & " from s_elib_doclink where inuse ='T' and (link_type = 'TAG' or  link_type is null) "
399.                xsql = xsql & " order by link_key "
400.                Set rx = Server.CreateObject("ADODB.Recordset")
401.                rx_SQL = xsql
402.                rx.Open rx_SQL, strCon,1,3
403.                If rx.RecordCount <> 0 Then
404.                rx.MoveFirst
405.                    Do While Not rx.EOF
406.  %>
407.          <option><%=rx("link_key")%></option>
408.          <%
409.                        rx.Movenext
410.                    Loop
411.                    rx.close
412.                End if
413.%>
414.        </select>
415.        </font></td>
416.    </tr>
417.    <tr>
418.      <td><strong><font size="2">Title</font></strong></td>
419.      <td colspan="3"><select name=Title id=Title style='width=483px'>
420.          <option><%=xTitle%></option>
421.          <%
422.                xsql = "select  distinct(title)  "             
423.                xsql = xsql & " from s_elib_docmast "
424.                xsql = xsql & " order by title "
425.                Set rx = Server.CreateObject("ADODB.Recordset")
426.                rx_SQL = xsql
427.                rx.Open rx_SQL, strCon,1,3
428.                If rx.RecordCount <> 0 Then
429.                rx.MoveFirst
430.                    Do While Not rx.EOF
431.  %>
432.          <option><%=rx("title")%></option>
433.          <%
434.                        rx.Movenext
435.                    Loop
436.                    rx.close
437.                End if
438.%>
439.          
440.        </select> <font size="2">&nbsp;</font><font size="2">&nbsp;</font></td>
441.      <td><font size="2">&nbsp;<strong>Manufacturer</strong></font></td>
442.      <td colspan="2"><font size="2">
443.        <select style='width=180px' id=select30 name=Manuf>
444.        <option><%=xManuf%></option>
445.          <%
446.                xsql = "select  distinct(link_key)  "              
447.                xsql = xsql & " from s_elib_doclink  where inuse ='T' and (link_type = 'MANUF' or  link_type is null)" 
448.                xsql = xsql & " order by link_key "
449.                Set rx = Server.CreateObject("ADODB.Recordset")
450.                rx_SQL = xsql
451.                rx.Open rx_SQL, strCon,1,3
452.                If rx.RecordCount <> 0 Then
453. 
454.                    Do While Not rx.EOF
455.  %>
456.          <option><%=rx("link_key")%></option>
457.          <%
458.                        rx.Movenext
459.                    Loop
460.                    rx.close
461.                End if
462.%>
463.        </select>
464.        </font></td>
465.    </tr>
466.    <tr>
467.      <td><strong><font size="2">Date : from : to</font></strong></td>
468.      <td colspan="3"> <input name="Date1" type="text" size="10" maxlength="10">
469.        <input name="Date2" type="text" size="10" maxlength="10">
470.        <font size="2">&nbsp;</font><font size="2">&nbsp;
471.        <input type="hidden" name="Act" value="A">
472.        </font></td>
473.      <td><font size="2">&nbsp;<strong>Model</strong></font></td>
474.      <td colspan="2"><font size="2">
475.        <select style='width=180px' id=select31 name=model >
476.        <option><%=xModel%></option>
477.          <%
478.                xsql = "select  distinct(link_key)  "              
479.                xsql = xsql & " from s_elib_doclink  where inuse ='T' and (link_type = 'MODEL' or  link_type is null) " 
480.                xsql = xsql & " order by link_key "
481.                Set rx = Server.CreateObject("ADODB.Recordset")
482.                rx_SQL = xsql
483.                rx.Open rx_SQL, strCon,1,3
484.                If rx.RecordCount <> 0 Then
485. 
486.                    Do While Not rx.EOF
487.  %>
488.          <option><%=rx("link_key")%></option>
489.          <%
490.                        rx.Movenext
491.                    Loop
492.                    rx.close
493.                End if
494.%>
495.        </select>
496.        </font></td>
497.    </tr>
498.  </table>
499.</hr>
500.  <table width="100%" border="0">
501.    <tr>
502.      <td height="26"><div align="center"> </div>
503.        <strong></strong></td>
504.      <td width="66%"><font size="2">&nbsp;
505.        <input name="Clear" type="reset" value="Clear"align="right" style= 'width=70px' >
506.        <input name="search2" type="submit" value="Search"align="right" style= 'width=70px'>
507.        <input name="exit" type="button" value="Exit"align="right" style= 'width=70px' >
508.        <input name="Input" type="text" size="5" maxlength="5" value"<%=Nrecord%>" >
509.        </font></td>
510.     
511.    </tr>
512.    <tr>
513.      <td colspan="2"><p>
514.          <iframe  name="Result" src="result.asp?x0=<%=xAct %>&x1=<%=xDoctype %>&x2=<%=xSubtype %>&x3=<%=xSubsubtype %>&x4=<%=xProject %>&x5=<%=xCreator %>&x6=<%=xVendor %>&x7=<%=xDocnumber %>&x8=<%=xTitle %>&x9=<%=xArea%>&x10=<%=xUnit%>&x11=<%=xTagType%>&x12=<%=xTag%>&x13=<%=xManuf%>&x14=<%=xModel%>&x15=<%=xDate1%>&x16=<%=xDate2%>"scrolling="yes" width="950" height="280" ></iframe>
515.        </p></td>
516.    </tr>
517.  </table>
518.  </hr>
519.  </form>
520. 
521.</body>
522.</html>



ยาวหน่อยแล้วก็ไม่รู้ว่าจะเกี่ยวกับหน้า search ไม๊แต่ก็เผื่อจะเกี่ยว โค้ดทั้งหมดก็มีเท่านี้แหละค่ะ
รบกวนด้วยนะค่ะ

ขอบคุณล่างหน้าค่ะ

ถ้าอันนี้ทำได้ก็คงจะหลุดพ้นจากกการงมโข่งซะที
Date : 2009-10-29 12:38:35 By : poyz-say-hi
 

 

No. 6

Guest


response.write xsql แล้วไป query ครับ
Date : 2009-10-29 12:49:00 By : อิอิ
 

 

No. 7

Guest


ผลออกมาเป็นแบบนี้
ก่อนที่ยังไม่ search
before_search


หลังจากที่คลิก search
after_search

หลังจากที่ click เพื่อไปที่หน้าต่อไปแล้วมันเป็นเป็นแบบนี้

before_search
Date : 2009-10-29 13:03:13 By : poyz-say-hi
 

 

No. 8



โพสกระทู้ ( 74,059 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

คุณจะต้องเอา SQL ทีได้ไปรันใน Query ดูครับ ส่ามันมี record ตามเงื่อนไข where หรือไม่
Date : 2009-10-29 13:07:15 By : webmaster
 

 

No. 9

Guest


ถามคุณ อิอิ หน่อยค่ะ

มันไม่เป็นที่ตัวคำสั่ง xsql ไม่ใช่หรอค่ะ เพราะว่า คิวรี่ได้ปกติ แต่มัน แบ่งหน้าไม่ได้
หรือว่ามันจะเกี่ยว

เอ๊ะยังไง
ช่วยตอบด้วยค่า
Date : 2009-10-29 13:07:18 By : poyz-say-hi
 

 

No. 10

Guest


กดที่ปุ่ม search แล้วผลมันออกมา มีหลาย record
แต่มันจะแสดงแค่ 10 record
เท่านั้น ต้องเอาไปรันใน query ยังไง
Date : 2009-10-29 13:12:36 By : poyz-say-hi
 

 

No. 11

Guest


พอกดแต่ละหน้าแล้วมันไปแสดงอ่ะ
paging





จะไหวไม๊เนี้ยะ
ช่วยด้วยยยยย
Date : 2009-10-29 13:18:18 By : poyz-say-hi
 

 

No. 12

Guest


paging
Date : 2009-10-29 13:20:46 By : poyz-say-hi
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : เกี่ยวกับการแสดงหน้าแต่ละหน้า และคำสั่ง absolutepage
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)





ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2025 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่