mysql update query ?

Associate
Joined
8 Oct 2005
Posts
97
Location
Bristol
im redoing the tables structures on the back of my site and ive hit a bit of a brick wall, im trying to merge the contents of two tables but i not sure on the syntax

i was thinking i could try something like...

UPDATE productsizes SET productsizes.SizeID = (SELECT sizes.productsize FROM sizes WHERE sizes.SizeID = productsizes.SizeID)

does that make sense ?
 
muppet :rolleyes:

just tried to update an integer with a string and ended up with nothing but null values, just as well i did a backup before hand

rtfm springs to mind, anyway problem solved
 
Back
Top Bottom