SQL and NOW()
Posted: Thu Oct 16, 2003 8:01 pm
$result= MYSQL_QUERY("INSERT INTO news (id, postdate, title, newstext, byuser)". "VALUES ('NULL', ' NOW( ) ', '$subject', '$message', '$_SESSION[loggedin]')");
The NOW() in that query just shows up as 00000000000000, what should I do to make it show up like it should, I get something like 20031016205717 when I do it with PHPMyAdmin but hows it done thru PHP in a query
and the postdate thing is timestamp(14), it says date because its how I was doing it when I started..but then I realized posts from same day wouldent be done in the right order
The NOW() in that query just shows up as 00000000000000, what should I do to make it show up like it should, I get something like 20031016205717 when I do it with PHPMyAdmin but hows it done thru PHP in a query
and the postdate thing is timestamp(14), it says date because its how I was doing it when I started..but then I realized posts from same day wouldent be done in the right order