Page 1 of 1

Help with command to update prices

Posted: Thu Mar 13, 2008 11:22 am
by oskare100
Hello,
I have one table with the name dummy. In that table there is two columns I want to use, test1 which contains product ID's and test4 which contains prices.

Then I have another table with the name products. In that table there amonh other columns two columns, one column with the name products_id with the products ids and another with the name products_prices which is the column I need to update with the prices from the test4 column in the dummy database.

So I want to select the prices and products ids from the dummy table and update the prices in the products table.

The products ids are the same in both tables and so is the number of lines. The only thing that differs is the prices, in the column test4 in the table dummy the real prices are and in the products table in the products_prices colum the wrong prices are that I want to update.

The reason for wanting to to that is that all prices in the table my webshop uses has changed to zero... And that is not good, I can't give away all products : )

Thanks
Oskar

Re: Help with command to update prices

Posted: Thu Mar 13, 2008 12:52 pm
by oskare100
I maybe should add that only the products with products_price = 0 in the products table needs to be updated.