4 Replies Latest reply on Dec 5, 2006 10:41 AM by Newsgroup_User

    Random record selection

    Level 7
      I want to be able to grab a random record from the database and display it
      on my front page of my web site. I thought I would just was a RandRange and
      set it from 1 to the recordcount of the table. Worked great at first.

      Then I realize that records are going to be deleted. So I added a check to
      see if that record exists. If it does, display, if not choose again. Seemed
      to work like a charm. I was wrong.

      If there are records (auto incremented) and I remove one and then do a
      recordcount, I will be one short, etc. Is there a way to do a random records
      selection based on the number of the record verses the actual incremented
      number of the id.

      The 6th record could be #6, #12, #13

      To make a long post short, too late, how can I choose the 6th or 9th or 34rd
      Wally Kolcz
      Developer / Support