This is a discussion on "Really stuck" within the Classic ASP section. This forum, and the thread "Really stuck are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Really stuck
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Really stuck
Hey i am building a website with a database and i have a search form which queries the database and it works fine it displays the results 16 per page but my client wants to show 16 results per page then be able to click either first previous next and last and have the results refresh themselves on the same page as used on this website when you view the threads
Page 1 of 17 1 23411 > Last » ![]() The code i have so far is below. dim sale dim sql dim total dim maxview ''below is just the sql query sql = "SELECT * FROM Houses WHERE" sql = sql & " Price >=" & request.form ("lower") if request.form ("upper") <> "" then sql = sql & " AND Price <=" & request.form ("upper") end if if request.form("Type") <> "any" then sql = sql & " AND Type ='" & request.form ("Type") & "'" end if if request.form ("area") <> "any" then sql = sql & " AND Area ='" & request.form ("area") & "'" end if if request.form ("bed") <> "0" then sql = sql & " AND Bed >=" & request.form ("bed") end if if request.form ("View") = "Price" then sql = sql & " ORDER BY Price desc" end if if request.form ("View") = "Date" then sql = sql & " ORDER BY Updated desc" end if maxview = request.form("maxview") ´´Opening the database Set sale = Server.CreateObject("ADODB.Recordset") sale.Open sql, objConn ''Getting the total number of records that match total = sale.recordcount ''Loop through 16 times to show the 16 results dim maxview maxview = 16 while (maxview <> 0) AND (NOT sale.EOF) ''Show the results maxview = maxview - 1 sale.MoveNext() wend i know i have to use the .movefirst,.moveprevious,.movenext and .movelast but i am at a loss as how to use them. I have read tutorials on these methods but none of them relate to my problem. Last edited by Paul00000001; Sep 12th, 2006 at 08:59. |
|
|
![]() |
| Tags |
| stuck |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| IIS stuck during upload | danielden | Classic ASP | 1 | Apr 17th, 2008 15:54 |
| It would seem I am stuck... | Rakuli | Webforumz Cafe | 11 | Sep 24th, 2007 14:57 |
| Help! Stuck on a site | tfox41 | Starting Out | 4 | May 30th, 2007 15:27 |
| Stuck... | JRX.Will | JavaScript Forum | 0 | Jan 18th, 2006 08:07 |
| Really Stuck | Someone | PHP Forum | 6 | Sep 17th, 2005 16:47 |