Insert into with join

so i have 2 databases one called comments and users but in a query i need to get username from users

INSERT INTO comments SELECT (text, post_id, user_id, created, username ) FROM comments INNER JOIN users values (:text, :post_id, :user_id, UTC_TIMESTAMP(), :username) " but i keep getting an syntax error, so my question is the JOIN in a bad position?



Read more here: https://stackoverflow.com/questions/67534189/insert-into-with-join

Content Attribution

This content was originally published by Mr. Blank at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: