php如何表示从当前日期起三个月之内的数据
php如何表示从当前日期起三个月之内的数据
查询语句用那个函数?
------解决方案--------------------
echo $deltime=strtotime("-90 days");
echo "
";
$sql="delete from yourtable where dateandtime
echo $sql;echo "
";
$con = mysql_connect("localhost","root","yourpassowrd");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("yourdb", $con);
mysql_query($sql,$con);
mysql_close($con);
echo "
Are You OK?
";
echo time();
?>