I am trying to enter the date in the database with an interval of 1 day, I use the following query
<?php $student = $_GET["student"]; $bookName = $_POST["bookName"]; $serialNum = $_POST["serial_num"]; $addQuery = "INSERT INTO book_week (student_id, book_name, serial_num, date_expiration) VALUES ('{$student}' , '{$bookName}', '{$serialNum}', '{$dateExpiration}' , 'DATE_ADD(NOW(), INTERVAL 1 DAY)'"; $addResult = mysqli_query($connection, $addQuery); } But the code does not work
Please help me fix the code.
DATE_ADD()in single quotes. Without them at all. It should work as a MySQL function. - cyadvert