UPDATE comment
SET
comment.user_id =wp_comments.user_id,
comment.comment_approved =wp_comments.comment_approved,
comment.comment_parent =wp_comments.comment_parent,
comment.comment_content =wp_comments.comment_content,
comment.comment_date =wp_comments.comment_date,
comment.comment_author_IP =wp_comments.comment_author_IP,
comment.comment_author_email =wp_comments.comment_author_email,
comment.comment_author =wp_comments.comment_author
from comment,wp_comments
where comment.comment_ID = wp_comments.comment_ID错误:#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from comment,wp_comments where comment.comment_ID = wp_comments.comment_ID' at line 11 是phpmyadmin 提示的。

解决方案 »

  1.   

    UPDATE comment,wp_comments
    SET
        comment.user_id =wp_comments.user_id,
        comment.comment_approved =wp_comments.comment_approved,
        comment.comment_parent =wp_comments.comment_parent,
        comment.comment_content =wp_comments.comment_content,
        comment.comment_date =wp_comments.comment_date,
        comment.comment_author_IP =wp_comments.comment_author_IP,
        comment.comment_author_email =wp_comments.comment_author_email,
        comment.comment_author =wp_comments.comment_author
    from comment,wp_comments
    where comment.comment_ID = wp_comments.comment_ID
      
      

  2.   

    不好意思  from comment,wp_comments 这个不要  没注意你怎么写的 还是看看手册吧
      

  3.   

    UPDATE comment INNER JOIN wp_comments ON comment.comment_ID = wp_comments.comment_ID
    SET
        comment.user_id =wp_comments.user_id,
        comment.comment_approved =wp_comments.comment_approved,
        comment.comment_parent =wp_comments.comment_parent,
        comment.comment_content =wp_comments.comment_content,
        comment.comment_date =wp_comments.comment_date,
        comment.comment_author_IP =wp_comments.comment_author_IP,
        comment.comment_author_email =wp_comments.comment_author_email,
        comment.comment_author =wp_comments.comment_author
      

  4.   

    UPDATE comment c,wp_comments w
    SET
      c.user_id =w.user_id,
      c.comment_approved =w.comment_approved,
      c.comment_parent =w.comment_parent,
      c.comment_content =w.comment_content,
      c.comment_date =w.comment_date,
      c.comment_author_IP =w.comment_author_IP,
      c.comment_author_email =w.comment_author_email,
      c.comment_author =w.comment_author
    where c.user_id=w.user_id
      

  5.   

    你的写法是sqlserver的 
    应该UPDATE comment,wp_comments
    SET
        comment.user_id =wp_comments.user_id,
        comment.comment_approved =wp_comments.comment_approved,
        comment.comment_parent =wp_comments.comment_parent,
        comment.comment_content =wp_comments.comment_content,
        comment.comment_date =wp_comments.comment_date,
        comment.comment_author_IP =wp_comments.comment_author_IP,
        comment.comment_author_email =wp_comments.comment_author_email,
        comment.comment_author =wp_comments.comment_author
    where comment.comment_ID = wp_comments.comment_ID