你的id都是唯一吗?
$sql=delete from t1 where id=$id;
执行删
$sql=delete from t2 where id=$id;
执行删
$sql=delete from t3 where id=$id;
执行删
$sql=delete from t4 where id=$id;
执行删
$sql=delete from t1 where id=$id;
执行删
$sql=delete from t2 where id=$id;
执行删
$sql=delete from t3 where id=$id;
执行删
$sql=delete from t4 where id=$id;
执行删
解决方案 »
- 启动php-cgi的问题。青蛙哥哥
- 有做过负载均衡的吗
- 求代码:某文章有多个关键词,如何为每个关键词加上链接?
- 关于从数据库中按条件抓出并显示数据执行效率的问题
- linux发mail的问题。。。。(PHP怎么得到送信失败返回值)
- smarty+php+linux 页面打开一片空白的问题
- php Imagick 求助, 如何使用Imagick裁切图片
- 请问像vbb这样的论坛是用什么方式保存当前会话信息
- 哪有php与xml结合,并使用dom,xsl等技术的资料或教程,请大家推荐,谢谢!
- Thinkphp 数据库结果集释放问题
- 关于上传文件的菜鸟问题(请大虾指教)
- php 里如何远程调用另一个服务地址上的网页?
$rs = mysql_query("select id from t2 where date<'$t'"); //检索待删除的记录
while(list($r) = mysql_result($rs))
$ar[] = $r;
$str = join(",",$ar); // 连接id列表成串,假定id为数字类型
mysql_query("delete from t1 where id in ($str)");
mysql_query("delete from t2 where id in ($str)");
mysql_query("delete from t3 where id in ($str)");
mysql_query("delete from t4 where id in ($str)");