Need help with a query

Every registered user on my website has a uID, like 110 for example. They can also have a distributor number that is stored in the database, like 1201186 for example. Until our website switched over to using referral addresses with the person’s distributor number, we were using the uID in the refer URL, like this:

Aromatherapy & Essential Oil Testimonials

Over time we realized that we really should be using the person’s distributor ID, instead, like this:

Aromatherapy & Essential Oil Testimonials

So when people register on our website, because they clicked on a referURL somewhere on the web, the database sometimes shows the referring distributor as 110, the uID or sometimes as 1201186, the actual distributor number.

It’s time to clean up the database, if possible, now that we have been using the new method for some time of just the person’s distributor ID in the referURL.

I need come up with a query that will look in the user database and find everyone where a distributor ID was recorded and replace it with that distributor’s uID.

Does this make sense? Is this even possible?

Thanks!

without seeing your table layout we’d have no idea on how to construct the query. shouldn’t be a problem with that info.

update table_name set id = distributor_id