Hi.
all I want to do is to write the current date to a mysql database when I add a record, but I'm having major problems doing it. I've tried variations of curdate() and currrent_date but to no avail. What I want to do is to write the php equivalent of cold fusion's
"#DateFormat('#CreateODBCDate(Now())#', 'dd/mm/yy')#"
except I guess it would have to be yyyy-mm-dd to keep mysql happy.
can anyone help? I've seen now() mentioned several times, and I've tried that too (see example code below) but all to no avail...
$addvalues = mysql_query("INSERT INTO pressitems (dateAdded, publication, storyTitle, storyLink, storyDate, addedBy, addedByEmail, comments) VALUES ('now()', '$publication', '$storyTitle', '$storyLink', '$year-$month-$day', '$addedBy', '$addedByEmail', '$comments')");
can anyone point me at a tutorial of give me a pointer?
TIA
ianwest