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:
re: [addlineitem] working almost (1997)
RE: type 2 errors with ssl server (1997)
flushdatabases (1997)
WebCat2.0 acgi vs plugin (1997)
Problems passing [SKU] with $Replace in 2.0 (1997)
RE: Shopping Cart Questions (1998)
Taget _top (2000)
WebCat2b12 - nesting [tags] (1997)
no global [username] or [password] displayed ... (1997)
allow or deny based on referer.... (1997)
RE: groups and [ShowNext] (1997)
[WebDNA] Snow Leopard (2009)
UPPERCASE (1997)
AutoUpdate Error 5 (2005)
Database Upload (2000)
Bug or syntax error on my part? (1997)
[WebDNA] WebDNA staging server (2008)
gateway application timeouts (1998)
[WriteFile] problems (1997)
PCS Frames (1997)