I have the following query with which I try to update the name of the user and the name of the post associated with that user
UPDATE users
JOIN posts ON (users.id = posts.user_id)
SET
users.nameUser = "mas blabla",
posts.namePost = "blabla"
WHERE users.id = 1;
However, I get the following error again
But if I modify the query and leave it alone then it works:
UPDATE users
JOIN posts ON (users.id = posts.user_id)
SET
users.nameUser = "mas blabla"
WHERE users.id = 1;
I do not understand why the error
UPDATE
I have tried numeric values, other columns to update them and the query works; in this way
UPDATE users
JOIN posts ON (users.id = posts.user_id)
SET
users.nameUser = "mas blabla",
posts.statusPost = 1
WHERE users.id = 1;
So why does a value in text string format fail?
I make the clarification, none of the titles of posts that I have registered coincide with the one of the update; no matter what value you put all the marks as duplicates