How to create and insert random number into mysql table
Posted on 2014-10-31
I am creating a form to populate a table in mysql database. I need the key column to be a random 4 digit number - from a random number generator.
It does not seem possible to insert this number automatically by choosing a mysql datatype.
Given this it seems I should create a 'hidden' field in the form which takes its value from a random number generator which kicks in when the form page is launched. However I do not know how to do this.
Thanks for any help