CanMan2004 Posted February 1, 2007 Share Posted February 1, 2007 Hi all I have a sql table called "member_details" and I have a field in that table called "myid", currently there is about 2,500 records in this table. I need to populate the field "myid" with a random MD5 string, such as 2f35400aba6fe42f51f48acc34b35e11 This is not a password, it's simply a ID number for each person. Is there a way to run a query in phpMyAdmin on the whole table "members_details" which will add in a MD5 string into the field "myid", without having to go through insert one manually. Any help would be great Thanks in advance Ed Quote Link to comment https://forums.phpfreaks.com/topic/36641-inserting-a-random-md5-into-sql/ Share on other sites More sharing options...
trq Posted February 1, 2007 Share Posted February 1, 2007 Surely your better off letting MySql create its own primary keys and use those to id records in the database? Is there a particular reason your trying to do what your doing? Quote Link to comment https://forums.phpfreaks.com/topic/36641-inserting-a-random-md5-into-sql/#findComment-174621 Share on other sites More sharing options...
cmgmyr Posted February 1, 2007 Share Posted February 1, 2007 You would have to generate a random sting of X amount of chars. then you would have to use the md5. Quote Link to comment https://forums.phpfreaks.com/topic/36641-inserting-a-random-md5-into-sql/#findComment-174622 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.