[eluser]peekk[/eluser]
Hello, let's say that I have two MySQL tables: table1 and table2.
table1 is: item varchar(100), description text, decritpion_id int
table2 is: id int, description text.
There are about 5000 records in table1, but some of them have the same descriptions. In example, items 1-16 have the same description, 17-72 too etc. There are 40 unique descriptions in this table.
I created the table2, and copied there all unique descriptions, there are 40 records right now in table2.
So what i want to do now, is to set the value of description_id in every record of table1 in way, that there is a value of id field in table2 for this description.
How to do it automatically for all 5000 records?
edit: ok, i did it