To add a unique password to every record in a 2,000 row database:

– generate list of random passwords (posted about that a few weeks ago)

Write short script that:

– reads every ID in database into an array
– reads every row in the password list into an array
– for every item in the ID array, do a SQL UPDATE with a corresponding element in the password array

The gears of two tables mesh like clockwork. Two thousand rows update in less than a second. I smile and go home.

Leave a Reply

Your email address will not be published. Required fields are marked *