Home > Backend Development > PHP Tutorial > PHP如何编写批量删除MYSQL数据库中的过期记录

PHP如何编写批量删除MYSQL数据库中的过期记录

WBOY
Release: 2016-06-13 13:23:51
Original
826 people have browsed it

PHP怎么编写批量删除MYSQL数据库中的过期记录?
我有一个表,里面有个到期时间的字段:endTime DATETIME,
到期时间 2010-01-02 00:00:01 
假如有100条过期的记录,我该怎么编写呢?

------解决方案--------------------
endTime 下于或者 2010-01-02 00:00:01 这个时间不久可以了吗?没lz明白意思
------解决方案--------------------
delete from table1 where endTime 这样行~~

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template