这样写错哪了好像只能清理第一个数据库
程序员文章站
2024-04-02 23:39:46
...
这样写哪里错了好像只能清理第一个数据库
$today=date('Ymd');
$date=date("Ymd",strtotime($today."-3 day"));
$arr=array('baidudy','aamm1');
foreach($arr as $value){
mysql_select_db('$value');
mysql_query("DELETE FROM `clicked` WHERE `date` mysql_query("DELETE FROM `clickip` WHERE `date` }
------解决方案--------------------
$today=date('Ymd');
$date=date("Ymd",strtotime($today."-3 day"));
$arr=array('baidudy','aamm1');
foreach($arr as $value){
mysql_select_db('$value');
mysql_query("DELETE FROM `clicked` WHERE `date` mysql_query("DELETE FROM `clickip` WHERE `date` }
------解决方案--------------------
- PHP code
foreach($arr as $value){ mysql_select_db("$value"); mysql_query("DELETE FROM `clicked` WHERE `date`
上一篇: 关于PHP数组的有关问题
下一篇: php表单提交至数据库_PHP教程