Update Query Doesnt work?
These are my table structures
tblcomment
- - - - - - - - - - - - - comment_i开发者_高级运维d content_id user_id picture_id comment comment_timetblpictures
- - - - - - - - - - - - - content_id title picture_idI am trying to update the content_id field on pictures using this but it doesnt seem to work ?
UPDATE `comments`
SET
comments.content_id = pictures.content_id
WHERE
comments.picture_id = pictures.picture_id
I get this error
1054 - Unknown column 'pictures.picture_id' in 'where clause'
UPDATE comments, pictures SET ...
精彩评论