What are the potential pitfalls of storing date values in separate columns in a MySQL database?

Storing date values in separate columns in a MySQL database can lead to inconsistencies and make it difficult to query or manipulate the data effectively. To solve this issue, it is recommended to store date values in a single column using the DATE data type. This allows for easier data management, querying, and ensures data integrity.

// Create a table with a single column for storing date values
$sql = "CREATE TABLE dates (
    id INT AUTO_INCREMENT PRIMARY KEY,
    date_value DATE
)";
$conn->query($sql);