mysql_select_db('baidu');
mysql_query("DELETE FROM `clicked` WHERE date < '$date'");
mysql_select_db('baidu1');
mysql_query("DELETE FROM `clicked` WHERE date < '$date'");
mysql_select_db('baidu2');
mysql_query("DELETE FROM `clicked` WHERE date < '$date'");
这里的mysql_query是执行上面的吗 最近打开的?
------解决方案--------------------
是每次都是上次数据库链接,不过楼主为什么不这么用
mysql_query("DELETE FROM baidu.clicked WHERE date < '$date'");
mysql_query("DELETE FROM baidu1.clicked WHERE date < '$date'");
mysql_query("DELETE FROM baidu2.clicked WHERE date < '$date'");
这样你也不用担心是不是打开那个数据库了,绝对安全,呵呵,