OK,
this an idea?
Load the old data from a csv (comma delimited file) into the new table (I'll call it now data). Add to this table the colum where you want the client ID (Say d_c_nr). In this table we also have a colum with names, say d_c_name.
You also have a table with clients, with an id colum: c_id and a name: c_name.
I htink this should be more easy with a join, but.. I am not sure how they work .. Not used them (Never seen the need. Maybe somebody can explain to me what hte big ++ of joins is..)
anyway:
$result = mysql_query("select * from clients");
while ($row=mysql_fetch_array($result))
{
$update = mysql_query("update data set d_c_nr=clients.c_id where d_c_name = c_name");
}
Should then do the trick. Then you delete th ecolum with names from data and you're done.
J.
PS: Do this sort of conversions always AFTER making a backup of your data..
J.