What SQL query syntax can be used to add a specific number of seconds to a datetime column in a database table?

When adding a specific number of seconds to a datetime column in a database table, you can use the DATE_ADD function in SQL. This function allows you to add a certain amount of time to a datetime value. By using this function in your SQL query, you can easily update the datetime column with the desired number of seconds added.

<?php
// Connect to the database
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "database";

$conn = new mysqli($servername, $username, $password, $dbname);

// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

// SQL query to add 60 seconds to the datetime column
$sql = "UPDATE table_name SET datetime_column = DATE_ADD(datetime_column, INTERVAL 60 SECOND) WHERE condition";

if ($conn->query($sql) === TRUE) {
    echo "Datetime column updated successfully";
} else {
    echo "Error updating datetime column: " . $conn->error;
}

$conn->close();
?>