update pw_memberdata
set support=(select count(*) from pw_posts.tid
where uid=pw_threads.authorid and uid<>pw_posts.authorid from pw_memberdata,pw_posts,pw_threads)
set support=(select count(*) from pw_posts.tid
where uid=pw_threads.authorid and uid<>pw_posts.authorid from pw_memberdata,pw_posts,pw_threads)
http://topic.csdn.net/u/20071224/14/2d81e27b-a3e7-40e0-b4cf-680d9da068ee.html
where uid=pw_threads.authorid and uid <> pw_posts.authorid from pw_memberdata,pw_posts,pw_threads
==================================================
这里pw_posts是表名吗?如果是,应该是
SELECT COUNT(*) FROM pw_posts where uid = (select uid from pw_posts,pw_memberdata,pw_threads where uid=pw_threads.authorid and uid <> pw_posts.authorid)
不过好象也没涉及到表pw_memberdata
PW_MEMBERDATA 列uid,support,
PW_THREADS uid,authorid
PW_POSTS uid,tid,authorid
set support=(select count(*) from pw_posts.tid
where uid=pw_threads.authorid and uid <> pw_posts.authorid )
set support=(select count(*) from pw_posts.tid
where uid=pw_threads.authorid and uid <> pw_posts.authorid from pw_memberdata,pw_posts,pw_threads)
(
select count(*) -- 要计算计数
from pw_posts.tid -- ? from 后面的不能是字段,应该是table/view
where uid=pw_threads.authorid -- 下面两行是筛选条件逻辑
and uid <> pw_posts.authorid
from pw_memberdata,pw_posts,pw_threads -- 又一次from ? 是否应该放到括号外面,再加一些条件?
)