Page 1 of 1

php5 - How To Populate A Field In A MySQL With uniqueid()?

Posted: Wed Jun 23, 2010 8:22 am
by ticonzero
Hello, I'm a newbye here and about PHP; be patient please :-)

I have a mySQL table with 15000 rows; I need to populate a field of it (varchar(15)) - to be used in a way similar to a primary key - with the uniqid() PHP function.

The algorithm is:

1 - positioning to the first row (record);
2 - generating a value with the uniqid() function;
3 - updating with it an empty field of that record;

All of those three steps till to the end of of the table (all of the records).

What is the PHP code to do all of that please?

Thank you.



Cypherinfo.

Re: php5 - How To Populate A Field In A MySQL With uniqueid(

Posted: Wed Jun 23, 2010 9:48 am
by Phoenixheart
Asking for the whole source code won't bring you any good result I'm afraid.