开发者

Update Query Doesnt work?

开发者 https://www.devze.com 2023-01-11 02:49 出处:网络
These are my table structures tblcomment - - - - - - - - - - - - - comment_i开发者_高级运维d content_id

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

精彩评论

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