Programming Logic Question Random Records

# Thread: Programming Logic Question Random Records

1. Senior Member
Join Date
Dec 1969
Posts
146

## Programming Logic Question Random Records

2. Senior Member
Join Date
Dec 1969
Posts
11,334

## Interesting requirement is right

cause it seems like it was real close to 5PM on a Friday when management came up with that silly requirement :)<BR><BR>Anyways, there&#039;s an FAQ on this site that tells you how to pull a random record. From there, you can just put the 5 address&#039; in an array and randomly display that to the page (if you need help with that as well just post)

3. Senior Member
Join Date
Dec 1969
Posts
146

## Read theFAQs, here is my best guest, pelase help :

4. Senior Member
Join Date
Dec 1969
Posts
11,334

## RE: Read theFAQs, here is my best guest, pelase he

Well, first off <BR><BR>where uid=&#039;jdoe&#039;" and address is not null and address != &#039;&#039;<BR><BR>Second, you have your &#039;correct&#039; address, you just need to add 4 more. You can stick them in the array in any order you want.... just when displaying it, move the order around. So you have<BR><BR>myArray(0) = Right address<BR>to<BR>myArray(4) = end of bad address<BR><BR>So when you response.write them out, you do a random order:<BR><BR>2<BR>1<BR>3<BR>0<BR>4<BR><BR>You already know element 0 is the right one... just the display is different. Are you stuck on how to do that?<BR>

5. Senior Member
Join Date
Dec 1969
Posts
146

## RE: Read theFAQs, here is my best guest, pelase he

6. Senior Member
Join Date
Dec 1969
Posts
146

## Just got a wrench thrown into my plan

well i was told that the table we are pulling from does not have an auto number so this wont work. I think I am goin to type a dummy array of addresses and randomly pull 4 from there. I will post my new idea in a second

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•