php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "NOW()"

What is the correct syntax in PHP to subtract 30 minutes from the current date and time obtained from the NOW() function?

To subtract 30 minutes from the current date and time obtained from the NOW() function in PHP, you can use the DateTime class along with the modify()...

What is the difference between using NOW() directly in a SQL statement versus using PHP functions like date()?

When using NOW() directly in a SQL statement, the timestamp generated is based on the server's timezone. This can lead to inconsistencies if the serve...

How can the NOW() function in MySQL be utilized to fill a datetime field when creating a new record in PHP?

When creating a new record in PHP and inserting it into a MySQL database, you can utilize the NOW() function in MySQL to automatically fill a datetime...

Are there best practices for accurately comparing dates in PHP, especially when using functions like NOW()?

When comparing dates in PHP, especially when using functions like NOW(), it's important to ensure that the dates are in the same format and timezone f...

What are the implications of the change in PHP 8.0.0 where the image function now expects a GdImage instance instead of a valid gd resource?

In PHP 8.0.0, the image function now expects a GdImage instance instead of a valid gd resource. To solve this issue, you need to create a GdImage inst...

Showing 41 to 45 of 180 results

‹ 1 2 ... 6 7 8 9 10 11 12 ... 35 36 ›
PHP.ORG

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

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.