473,387 Members | 1,485 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Shuffling / Random

Hi, i have a db where ± 15 users stores multiple second hand items with
images.
Now i wish to display on the openingpage a list of all users with 1 item +
image. So far no problem.

But now i wish to change the order of the users every time the pages open.

How can i shuffle the recordset before i load the users in a array, or how
can i shuffle the array after populating with the users?
Thx - John.

x=1
RS.open "SELECT DISTINCT * FROM tblUsers"
Do While Not RS.Eof
users(x) = RS("usr_vat"):x=x+1
RS.MoveNext
Loop
RS.Close

Jul 21 '05 #1
1 1184
http://www.aspfaq.com/2132

--
http://www.aspfaq.com/
(Reverse address to reply.)


"John" <n o b o d y@spam.com> wrote in message
news:s1***********************@phobos.telenet-ops.be...
Hi, i have a db where ± 15 users stores multiple second hand items with
images.
Now i wish to display on the openingpage a list of all users with 1 item +
image. So far no problem.

But now i wish to change the order of the users every time the pages open.

How can i shuffle the recordset before i load the users in a array, or how
can i shuffle the array after populating with the users?
Thx - John.

x=1
RS.open "SELECT DISTINCT * FROM tblUsers"
Do While Not RS.Eof
users(x) = RS("usr_vat"):x=x+1
RS.MoveNext
Loop
RS.Close

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: glowfire | last post by:
Please, somebody help me with this program! We have a deck of 52 cards and we shuffle the deck by choosing a random card out of the deck placing it back in the deck at some random place. Repeat...
3
by: SilverWolf | last post by:
I need some help with sorting and shuffling array of strings. I can't seem to get qsort working, and I don't even know how to start to shuffle the array. Here is what I have for now: #include...
4
by: John Slate | last post by:
Not sure exactly how to ask this, but I have a situation where I need to 'shuffle' the order of a list of test questions, so that the questions appear in a random order each time the test is taken....
8
by: ericvw | last post by:
How would I shuffle a static array of 52 cards that you input an integer, n, into a function and it takes the first n cards as the left segment and the remaining as the right. Then it shuffles...
22
by: greenflame | last post by:
I would like to make a function that takes a list, more specificaly a list of strings, and shuffles its elements, like a pile of cards. The following is a script I tryed to make that implements...
1
by: RishiD | last post by:
Hi, Trying to shuffle a linked list of cards around. I know not the ideal structure to use, but it is what my professor wants. I wrote all the code and the logic makes sense, but for some...
4
by: Pratik | last post by:
For the time being, I'm doing a simple swap method for my deck of cards using the random number generator in cstdlib. I've created a dynamic array of a type class Card. When I go to shuffle it and...
3
by: JayP | last post by:
I'm trying to shuffle a deck of card in C ++, with out having the same card twice. And I'm supposed to give each player 5 cards. And if they want, they can replace 3 cards. Right now I can assign 5...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.