开发者

Update Query Doesnt work?

These are my table structures

tblcomment

- - - - - - - - - - - - -

comment_i开发者_高级运维d

content_id

user_id

picture_id

comment

comment_time

tblpictures

- - - - - - - - - - - - -

content_id

title

picture_id

I 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 ...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜