Hi all
I have two simple tables t1 and t2. I want to update the price field in t2 with the values of the (selected) price field in t1. I have followed other threads regarding similar problems and have worked out that these two attempts should work. Alas, they don't. Anybody any ideas?
Thanks.
UPDATE t2, t1
SET t2.price = t1.price
WHERE t1.item_code=t2.item_code
AND (((t1.selected)= 1))
UPDATE t2 INNER JOIN t1 ON t1.item_code=t2.item_code
SET t2.price = t1.price
WHERE (((t1.selected)= 1))
I am pasting these directly into mysql using phpmyadmin.
I have two simple tables t1 and t2. I want to update the price field in t2 with the values of the (selected) price field in t1. I have followed other threads regarding similar problems and have worked out that these two attempts should work. Alas, they don't. Anybody any ideas?
Thanks.
UPDATE t2, t1
SET t2.price = t1.price
WHERE t1.item_code=t2.item_code
AND (((t1.selected)= 1))
UPDATE t2 INNER JOIN t1 ON t1.item_code=t2.item_code
SET t2.price = t1.price
WHERE (((t1.selected)= 1))
I am pasting these directly into mysql using phpmyadmin.