你有时间的字段吗,如果有的话,最好用时间戳输入,这样的话就可以删除了$a = time() - 30;
mysql_query("delete from table where 字段<='$a'");
mysql_query("delete from table where 字段<='$a'");
解决方案 »
- rewrite 规则求解,在线等…………
- php 守护进程 如何自动加载更新后的配置文件
- 基础问题
- php计算两天日期差时包括天数小时分数
- <a href="#" shref="day.php?year=2006">这其中的shref是什么用法?
- 我这样的条件,做怎么样的工作较为合适?
- 菜鸟问题,高手帮忙看一下,是什么错误?
- 急。。在线等问题
- PHP5里的类的常量,大家先别急着马上测试,先看看,会输出什么?
- LIMIT 0 , 30 0指代什么呢?
- 我在test111.php中给两个session赋了值,按道理说,应该可以在test222.php中读出来,可是去不行,为什么?谢谢!
- PHP怎么做日历
field是时间戳的话
delete from table where field+30<unix_timestamp()
field不是时间~的话
delete form table where time_to_sec(field)+30<unix_timestamp()