Dijkgraaf - 10:49 pm on Apr 4, 2012 (gmt 0)
Is there something fundamentally wrong with my statement?
Yes there is something fundamentally wrong.
Your temp table isn't actually included in your SQL statement as you don't have a FROM clause that lists it as table to include in the query.
It has to be something like the below (please note I haven't run this so it may still have syntax errors)
SET `places.wc` = `temp.gen_wc`, `places.cc` = `temp.gen_cc`, `places.gh` = `temp.oth_gh`
INNER JOIN 'temp' ON `places.id` = `temp.id`;
I did a search on mysql update select from
and also came up with another example
ON related_category.rel_cat_id = product_category.cat_id
SET related_category.rel_cat_name = product_category.cat_name