Really stuck

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 12th, 2006, 08:50
Junior Member
Join Date: Jul 2006
Location: spain
Age: 20
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote

Reply

Tags
stuck

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 06:34.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43