更新该句
update da_question set answer_time = now()
where id in (
select id from da_question where answer_time is null and id in (select distinct parent_id from da_question)
)
在 MySQL 命令列工具中傳回:
ERROR 1093 (HY000): You can't specify target table 'forum_members' for update in FROM clause
改成下列命令處理就 可以解决无法更新的问题
update da_question a inner join ( select id from da_question where answer_time is null and id in (select distinct parent_id from da_question)) b on a.id=b.id set answer_time=now();
阅读(1796) | 评论(0) | 转发(0) |