报错原因:mysql规定了;upload子查询问题,不能像我这样写,这是mysql目前的版本缺陷我是这样写道:UPDATE vote_items set times=((SELECT times from vote_items where id=2)+1) WHERE id=2;上网查有两种解决方发1,子查询里的表起个别名2;创建个临时的表但00000000000------------------------------------------两种我有种没法下手,不会,求给条生路吧,嘤嘤嘤!!!!!详情如下[SQL]-- SELECT times from vote_items where id=2-- UPDATE vote_items set times=(100+1) WHERE id=2;-- UPDATE vote_items set times=((SELECT times from vote_items where id=2)+1) WHERE id=2;UPDATE vote_items set times=((SELECT times from vote_items where id=2)+1) WHERE id=2;[Err] 1093 - You can't specify target table 'vote_items' for update in FROM clause
添加回答
举报
0/150
提交
取消