hi, i wanna know if this is possible or not.
lets assume that i ve a "date" column, like this:
CREATE TABLE mytable (
id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT ,
mydate DATE NOT NULL
);
each time I want to insert a row to this table, i have use NOW() statement, like this:
mysql_query("INSERT INTO mytable (id, mydate) values ('', NOW())");
is there a way to set mydate column so that i wont need to type NOW() in mysql_query? like timestamp colums which puts the current timestamp automatically.
i tried smt like this
CREATE TABLE mytable (
id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT ,
mydate DATE DEFAULT 'CURRENT_DATE()' NOT NULL
);
but couldnt make it work.