Hi All,
Is it possible?
Below I am using with with one key, but I would like to check two fields now before updating/adding new record.
What key it's looking for here? it has to be movie_id..
INSERT INTO tbl_movies_genre
(tbl_movies_genre.movie_id, tbl_movies_genre.movie_genre)
VALUES ('"& movieID &"', '"& movieGenre &"')
ON DUPLICATE KEY UPDATE tbl_movies_genre.movie_genre =movieGenre;
But I would like something like that:
INSERT INTO tbl_users_comments
(tbl_users_comments.movieID, tbl_users_comments.userID, tbl_users_comments.comment)
VALUES ('"& movieID &"', '"& userID &"', '"& movieComment &"')
ON DUPLICATE KEY UPDATE tbl_users_comments.comment =movieComment;
SO I would be checking if movieID and UserID exists already in a record.
Is it possible?
Below I am using with with one key, but I would like to check two fields now before updating/adding new record.
What key it's looking for here? it has to be movie_id..
INSERT INTO tbl_movies_genre
(tbl_movies_genre.movie_id, tbl_movies_genre.movie_genre)
VALUES ('"& movieID &"', '"& movieGenre &"')
ON DUPLICATE KEY UPDATE tbl_movies_genre.movie_genre =movieGenre;
But I would like something like that:
INSERT INTO tbl_users_comments
(tbl_users_comments.movieID, tbl_users_comments.userID, tbl_users_comments.comment)
VALUES ('"& movieID &"', '"& userID &"', '"& movieComment &"')
ON DUPLICATE KEY UPDATE tbl_users_comments.comment =movieComment;
SO I would be checking if movieID and UserID exists already in a record.