Random Record

Results 1 to 2 of 2

Thread: Random Record

  1. #1
    Join Date
    Dec 1969

    Default Random Record

    I'm wondering if it is possible to pull a single random record from a database, what I would like to do is set up about 100 or 200 join keys/codes. When a user attempts to join the site it stores their information in a pending users table, with a random join code and sends that join code to them in an email. When they return and supply their username and joincode, it will write their information to the regular users table. How would I go about pulling that random join code from the database, or is there an easier alternative to solving this??

  2. #2
    Join Date
    Dec 1969

    Default RE: Random Record

    There are a plethora of articles on this topic at 4Guys:<BR>http://www.4guysfromrolla.com/ASPscripts/search.asp?searchtext=random+record<BR><BR>It seems like it might just be easier to send the user a random string and having a column in the user database table called random string. Just randomly generate some string that you slap in the user&#039;s row in the User table, then email them that random string. When they attempt to validate their login, make sure that the random string they enter matches the random string in their record.<BR><BR>To learn how to create a random string, check out:<BR>http://www.4guysfromrolla.com/webtech/tips/t011100-1.shtml

Posting Permissions

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