[EMAIL PROTECTED] wrote:
> I just want to show a random picture form all those in my database.  I used
> to just get the number of pics in my DB, then geta RND # and then call that
> ID, but, because I Autonumber them, when a pic got deleted, I would
> sometimes get an error.
> 
> So, how can I get a rnd Pic ID from a database that has say 20 pics, but 10
> are set to NOT be shown....ideas?

create an array from the db with the ID's, or names of the pictures,
and periodically update them to say an application variable...

then choose a random number from the array.

-- 
-----------------------------------------------------------------------
  Michael J. Ryan                          |      ICQ: 4935386
      tracker1(at)theroughnecks(dot)com    |  AIM/AOL: azTracker1
  Roughneck BBS:                           |    Yahoo: azTracker1
      http://www.theroughnecks.net         |      MSN: (email address)
      telnet://theroughnecks.net           | Trillian: www.trillian.cc


---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to