Home  >  Article  >  Backend Development  >  这样写错哪了好像只能清理第一个数据库

这样写错哪了好像只能清理第一个数据库

WBOY
WBOYOriginal
2016-06-13 13:28:55826browse

这样写哪里错了好像只能清理第一个数据库
$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` 
                 
              
              
        
            
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn