MYSQL multiple methods for querying time data
This article mainly gives you a brief talk about MYSQL a variety of query time data methods, related technical terms you can check online or find some related books to supplement, here is not involved, we will go straight to the topic, I hope MYSQL a variety of query time data methods This article can bring you some practical help.
mysql query this quarter
today
select * from table name where to_days(time field name) = to_days(now());
yesterday
SELECT *FROM TABLE NAME WHERE TO_DAYS( NOW( ) ) - TO_DAYS(TIME FIELD NAME)