MySQL provides easy access to database records
and makes it possible to carry out manipulations on the data. To select time-related data from the database, MySQL provides a simple keyword known as INTERVAL. The INTERVAL MySQL command
allows the data to be compared within the time specified in the parameter and selects only those records that match the selection criteria. To select database records
which are one day old for example, the parameter in the INTERVAL MySQL command
should be 1. For previous records, the number of days can be specified according to the parameter.
- Use the following syntax:
- In order to select previous records:
Published by netty5
Latest update on March 5, 2012 at 10:20 AM by Virginia Parsons.