Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道为什么这个 SQL 查询$datetoday在它工作后没有清除我的表(变量中的表名)查询,有什么问题吗?现在 $datetoday = 300313
$datetoday
mysql_query('TRUNCATE TABLE `data`.`".$datetoday."`');
编辑:错误是:
Could not clear table: Table 'data.".$datetoday."' doesn't exist
改成:
mysql_query('TRUNCATE TABLE `data`.`' . $datetoday . '`');
您将查询括在其中,'但随后使用"around $datetoday。
'
"