title: Insert current date/time using now() in a field using MySQL/PHP
body: <p>Since MySQL evidently cannot automatically insert the function now() in a datetime field in adding new records like some other databases, based on comments, I'm explicitly trying to insert it using an SQL statement. (People seem to think timestamp with curdate() is not the answer due to the various limitations of timestamp.) There are numerous articles on the web suggesting inserting now() using SQL should work.</p>
  
  <p>When I try to insert the date time using the SQL statement, however, the field does not populate with the current time/date, but it only gives me the default 0000-00-, etc. This is probably a syntax error, but it's driving me crazy, so I am posting it. </p>
  
  <pre><code>mysql_query("INSERT INTO users (first, last, whenadded) VALUES ('$first', '$last', now())"; 
  </code></pre>
  
  <p>It inserts first and last, but nothing for when added, leaving 0000-00-00, etc. in the whenadded field.</p>
  
  <p>The field type is datetime, it has no collation, attributes, null default or extra. BTW, I tried putting now() in single quotes... It threw an error.</p>