Random Record

Results 1 to 3 of 3

Thread: Random Record

  1. #1
    Join Date
    Dec 1969

    Default Random Record

    Hi, <BR><BR>I have an intranet site for vacancies within the organisation I work for. I&#039;d like to have a "todays vacancy" page which displays an OPEN vacancy which is selected randomly from the database each time someone views the page. <BR><BR>The problem is that I only want to display vacancies that are still open for application, i.e. closing_date &#062;= date().<BR><BR>Is it possible to display a record based upon it&#039;s position within a recordset?<BR><BR>Thanks in advance. <BR><BR>Martin

  2. #2
    Join Date
    Dec 1969

    Default RE: Random Record

    My initial guess would be the following:<BR><BR>1. Create you recordset for Vacancies<BR>2. Get the number of rows in the recordset<BR>3. Run a random number using that value<BR>4. Retrieve the record using the random number<BR><BR>Hope this helps<BR>Paulee

  3. #3
    Join Date
    Dec 1969

    Default ASPFAQs, category Databases, Queries

    The link to the ASPFAQs is at the top right corner of most every page on this site, including the one you are looking at right now.<BR><BR>There are a couple of FAQs on random records. The fact that you are limiting the set of records to only some of those in the table does *not* affect the answers.<BR><BR>

Posting Permissions

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