php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "DATE_SUB"

What are some best practices for retrieving and displaying data based on specific time intervals, such as days or weeks, in PHP?

When retrieving and displaying data based on specific time intervals in PHP, one best practice is to use SQL queries with date functions to filter the...

What SQL query can be used to select records from the last month in a database?

To select records from the last month in a database, you can use the following SQL query: ``` SELECT * FROM table_name WHERE date_column >= DATE_SUB(...

How can DATE data type be used to perform calculations on birthdays in MySQL?

To perform calculations on birthdays in MySQL using the DATE data type, you can use the built-in MySQL functions like DATEDIFF to calculate the differ...

In PHP, what are the recommended methods for comparing and filtering database records based on time intervals, such as selecting users whose last_hit time is within 10 minutes of the current time?

When comparing and filtering database records based on time intervals in PHP, one recommended method is to use SQL queries with the DATE_SUB() functio...

How can one ensure that a PHP MySQL query only returns results where a maximum of two out of three date fields are older than a year?

To ensure that a PHP MySQL query only returns results where a maximum of two out of three date fields are older than a year, you can use the DATE_SUB...

Showing 36 to 40 of 47 results

‹ 1 2 3 4 5 6 7 8 9 10 ›
PHP.ORG

A free knowledge base for PHP developers. Open to all.

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.