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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ticonzero
Forum Newbie
Posts: 1
Joined: Wed Jun 23, 2010 8:19 am

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

Post 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.
Phoenixheart
Forum Contributor
Posts: 123
Joined: Tue Nov 16, 2004 7:46 am
Contact:

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

Post by Phoenixheart »

Asking for the whole source code won't bring you any good result I'm afraid.
Post Reply