Forum Moderators: coopster
I'm trying to update tblA but I need to join it with tblB kind of like this:
UPDATE tblA, tblB SET tblA.somerow = 'someval' WHERE tblA.somthing=1 AND tbl.sothingelse=0 AND tblA.id = tblB.correspondingid
But although it looks like that's the way to do it from the manual, it's giving me errors on the "UPDATE tblA,tblB" bit so I guess i'm missing somthing?
Any pointers/help much appreciated....
Thanks
Nick
update <join-statement> set column-from-join = 'newAval' where <conditions>
Yes. Here's the actual statement with the names changed to protect the innocent ;)
UPDATE posts, postcontrols SET text = 'test text' WHERE postcontrols.parent = '9' AND postcontrols.start=1 AND postcontrols.postid = posts.id
and the error:
You have an error in your SQL syntax near ' postcontrols SET text = 'dddddddd' WHERE postcontrols.p' at line 1
>version
3.23
Thanks everyone...
Nick