I have a table which I want to record the timestamp of every order at every insertion time. However, I'm getting zero values for the timestamps.
Here's my schema:
CREATE TABLE IF NOT EXISTS orders(
order_no VARCHAR(16) NOT NULL,
volunteer_id VARCHAR(16) NOT NULL,
date TIMESTAMP DEFAULT NOW(),
PRIMARY KEY (order_no),
FOREIGN KEY (volunteer_id) REFERENCES volunteer(id)
ON UPDATE CASCADE ON DELETE CASCADE)