I have a UNION statement to retrieve data from 2 tables using a WHERE clause.
Just wondering if it is possible to have a SQL statement to UPDATE a column (Comments) from either table1 or table2 depending on which table that data is within.
I was thinking something along the lines of below...
UPDATE `table1` OR `table2`
SET `Comments` = '$AddComment'
WHERE `column` = '$GetColumn'
I have tried the statement within the question, however receive the following error message...
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR table2 SET Comments = 'comment' WHERE column = '$GetColumn' at line 1
***The thing is though, what i am trying to update is only within one of those tables and not both