Generate MySQL Datetime Type Using PHP Date() Function

No Comments
Tags: , , , , ,
Posted 05 Feb 2010 in php

If you want to insert a datetime that matches the default mysql datetime type format use this

date('Y-m-d H:i:s');

Related posts:

  1. Managing Timestamps in MySQL with a Trigger
  2. Problem slash Bug in Rails with attr_accessor and Datetime Select Fields
  3. Custom Date Formats for Your Rails Application
  4. Fixing MySQL for Rails 2.2 Development on Mac OS X
  5. mysql on rails 2.3.2

Add Your Comment