出于某种原因,我想删除我的表中使用php mysql查询函数的一些记录。这是我写的在mysql中执行多个sql删除查询for php
$sql = "delete from progress where first_date='2010-01-01' and last_date='2010-01-31';
delete from progress where first_date='2010-02-01' and last_date='2010-02-28';
delete from progress where first_date='2010-03-01' and last_date='2010-02-31';
delete from progress where first_date='2010-04-01' and last_date='2010-02-30';
delete from progress where first_date='2010-05-01' and last_date='2010-02-31';";
if(!mysql_query($sql)) echo "Error deleting records";
这正是我得到的,“错误删除记录”。但是,如果使用mysql_error()来使用它,毕竟它没有用。任何人都知道如何处理这个?感谢之前
把你最后的回声改为'echo'删除记录时出错:',mysql_error();',它会吐出发生的确切错误。只是说“发生了什么事”是没有用的。 – 2010-07-02 14:54:47