Re: Generating a random image, but avoiding repeated images.
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 25286
interpreted = N
texte = Random includes the possibility of repeated numbers, by definition. However, ifyou do not want to repeat, add a field to the image database called SHOWN (orwhatever) and do your random search on all records where SHOWN not Y; once youhave selected an image, update that record with SHOWN=Y. The last thing youneed is a test for [NumFound]=0, in which case you reset the whole table and doanother random search.HTHJohn Peacock____________________Reply Separator____________________Subject: Generating a random image, but avoiding repeated images. Author:
(WebCatalog Talk)Date: 12/8/99 1:55 PMWe have a database of several hundred images from which I would like topull a random image. This is pretty easily accomplished using the Searchfeature and its random function.My question is this: How can I make sure that each image gets displayed atleast once, and that there aren't repeating images?My first solution is to implement a secondary database which records thenumber of the image, say 3 of 200, and if 3 of 200 was previouslydisplayed, it would automatically do another random search until it foundan unused number graphic.Does this make sense? Is there a shortcut in webcatalog so I can have thesearch be sure to generate non-repeating random results?Thanks for any assistance.Christopher FeyrerSystem AdministratorFoodSpot.comchris@foodspot.com-------------------PGP 6.x key available.-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to
Associated Messages, from the most recent to the oldest:
|
- Re: Generating a random image, but avoiding repeated images. (jpeacock@univpress.com 1999)
|
Random includes the possibility of repeated numbers, by definition. However, ifyou do not want to repeat, add a field to the image database called SHOWN (orwhatever) and do your random search on all records where SHOWN not Y; once youhave selected an image, update that record with SHOWN=Y. The last thing youneed is a test for [NumFound]=0, in which case you reset the whole table and doanother random search.HTHJohn Peacock____________________Reply Separator____________________Subject: Generating a random image, but avoiding repeated images. Author: (WebCatalog Talk)Date: 12/8/99 1:55 PMWe have a database of several hundred images from which I would like topull a random image. This is pretty easily accomplished using the Searchfeature and its random function.My question is this: How can I make sure that each image gets displayed atleast once, and that there aren't repeating images?My first solution is to implement a secondary database which records thenumber of the image, say 3 of 200, and if 3 of 200 was previouslydisplayed, it would automatically do another random search until it foundan unused number graphic.Does this make sense? Is there a shortcut in webcatalog so I can have thesearch be sure to generate non-repeating random results?Thanks for any assistance.Christopher FeyrerSystem AdministratorFoodSpot.comchris@foodspot.com-------------------PGP 6.x key available.-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to
jpeacock@univpress.com
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
breaking & sorting (2000)
Email Set-Up? (1997)
F3 crashing server (1997)
[OT] Games (2005)
No Data Results (1997)
WebCatalog can't find database (1997)
I'm tired of all this! (2000)
WebCatalog for guestbook ? (1997)
Sandboxes (2004)
2cd pare of eyes. (2001)
upgrade? (1997)
Extended [ConvertChars] (1997)
File Upload (1997)
can WC render sites out? (1997)
[shownext max (1997)
How much is the Upgrade (2000)
Questions To Answer (1997)
Username/Password with [Protect] (2000)
Secure server question (1997)
Error 11 (1996)