I am trying to create a table in MySQL(current version) that fills in the current date and the return date 7 days later.
I have the code set up like this:
CREATE TABLE Loans (
loan_id int(5) not null auto_increment primary key,
loan_date CURDATE,
return_date CURDATE (getdate()+7),
loan_notes varchar(200)
);
Obviously, this is not working. I have tried it with DATE, DATETIME (basically any variation on DATE) and the MySQL helpguide is... not so helpful here. I tried checking a few other answers on here but haven't had any luck. I could set a form linked to MySQL that asks for the user to input the info, but I would rather have it auto-generate if I can.
Any suggestions?