OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

sorting database results

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> sorting database results
Page: [1]
 
barking mad

 

Posts: 287
Joined: 12/6/2002
From: Out in the sticks, UK
Status: offline

 
sorting database results - 4/27/2009 7:03:13   
I have an access database which when queried (using ASP coding) returns back a list of members

I want to be able to display that list in a random order evry time. So if you returned the same list of members again they would display in a different order.

I know how to a-z both asc and desc, I've seen rnd and rand used but neither seem to work with access.

Any ideas would be appreciated. Thanks.

_____________________________

The more I ask, the more I learn, the more I' m confused, therefore the more I ask ...
TexasWebDevelopers

 

Posts: 722
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: sorting database results - 4/27/2009 10:11:33   
http://www.texaswebdevelopers.com/examples/retrieverandomrecords.asp

_____________________________

:)

Follow us on TWITTER

(in reply to barking mad)
barking mad

 

Posts: 287
Joined: 12/6/2002
From: Out in the sticks, UK
Status: offline

 
RE: sorting database results - 4/27/2009 10:28:02   
thanks for that but the results set that is initially returned is to be the same every time, see pm.

_____________________________

The more I ask, the more I learn, the more I' m confused, therefore the more I ask ...

(in reply to TexasWebDevelopers)
TexasWebDevelopers

 

Posts: 722
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: sorting database results - 4/27/2009 12:20:47   
Got it--you want the code to simply randomize the display of the results?

_____________________________

:)

Follow us on TWITTER

(in reply to barking mad)
TexasWebDevelopers

 

Posts: 722
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: sorting database results - 4/27/2009 12:44:34   
Here is a great article that should help you along:
http://www.15seconds.com/Issue/010911.htm
Essentially it adds a random order by clause to the record set.
Because "true" randomized records are more difficult than most folks realize, this article talks about various randomizing techniques and has applicable code.

_____________________________

:)

Follow us on TWITTER

(in reply to TexasWebDevelopers)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> sorting database results
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts