aboskoco
asked on
Random Auto increment number
Is it posible to have a field that auto increments to a random number.
basicly instead of
1
2
3
I would like to see
234234
523452
112355
A randomly created unique number that is placed in the field when a line is created
basicly instead of
1
2
3
I would like to see
234234
523452
112355
A randomly created unique number that is placed in the field when a line is created
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Nellios,
Could you please go into a little more depth.
Could you please go into a little more depth.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for all your imput
why the "B" grades for all?
surely all the possible solutions have been given
surely all the possible solutions have been given
ASKER
The first question is "Purpose of author creating random non unique numbers through mysql.
The table will be a second level verification between two pages.
Page one creates table line in "create number table" and receives number into variable -> passes number to next page. Maybe I am incorrect but I think it would be more secure to create a random number in the database and querying it on the page; rather then creating on page and passing to database.
Number is then verified against "used numbers table" to ensure that number has not been used -> If not used it verifies that variable is on "create number table" -> allows for content to be viewed -> deletes (or marks used) in "create number table" and enters number in "used number table"
You are correct it doesn't have to be an 'number' it could be a md5hash type field. It just needs to be unique. And Automaticly created.
Keep the thoughts comming :)