Link to home
Start Free TrialLog in
Avatar of aboskoco
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
SOLUTION
Avatar of Raynard7
Raynard7

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aboskoco
aboskoco

ASKER

I like the debate.  This is turning out to be an excellent topic.

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 :)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Nellios,

Could you please go into a little more depth.
SOLUTION
Avatar of mankowitz
mankowitz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for all your imput
why the "B" grades for all?
surely all the possible solutions have been given