嗯~``应该是正确的吧~假如你的tid是int型的话~
delete from cdb_threads where tid not in (select tid from cdb_posts)
delete from cdb_threads where tid not in (select tid from cdb_posts)
解决方案 »
- 一个系统允许同一个帐号最多10个人同时登录在线,怎么做呢?
- PDO fetch的问题
- PHP5.02里面有个libmysqli.dll文件。5.02以上就没有。有问题,请进来看
- mysql数据库连接问题,总解决不了,请大家帮助
- 天大的发现,高兴,散分..........
- 请问register_global=on的时候可以在同一页显示刚设定的cookie吗?在线等
- php中得到本页url的方法是什么?
- 大家帮忙看看怎么解决这个问题
- 狂晕的问题!!!Apache升级后出问题了!!!高手请进来!相送分数!!!!!!
- 已经从php mysql 返回数组后如何写入div之中!求源码
- 当变量非常多时,请教解决方法!
- 找个正确的原创帖子都难
where not exists(select * from cdb_posts as b where a.tid=b.tid)
看看这个可行?
就应该把cdb_threads表ATID字段对应表cdb_posts的数据全删除应该是in而不是not in吧
delete from cdb_threads where cdb_threads.atid in (select cdb_posts.atid from cdb_posts)
感觉题目好模糊呀..