Skip to content
PHP Logo

What is the difference between CURDATE() and CURRENT_DATE() in MySQL?

The difference between CURDATE() and CURRENT_DATE() in MySQL is that CURDATE() is a function that returns the current date without a time component, while CURRENT_DATE() is a synonym for CURDATE(). Both functions are used to retrieve the current date in MySQL queries.

php
$query = "SELECT * FROM table WHERE date_column = CURDATE()";
$result = mysqli_query($connection, $query);