FROM_UNIXTIME
Many of you I'm sure are aware of the mysql command unix_timestamp() to allow a mysql formatted datetime to be outputted in a unixtime stamp
SELECT UNIX_TIMESTAMP(datetime) unixdate FROM Posts;
Which is good but a new function I discovered while trying to link my twitter/digg/post time line to represent the same space of time I need to send a unixtime to MySQL and then translate this to MySQL format. I could of course have still used the UNIX_TIMESTAMP() but I came across a new function, FROM_UNIXTIME() and opted to use this instead.
<?php $this->Post->find('all', $conditions = array('Post.created <=' => 'FROM_UNIXTIME('.$unixtime.')')); ?>Simple function to grab all Posts from a particular date onwards. You may also set the format that the unix timestamp will be changed to. FROM_UNIXTIME(timestamp, FORMAT);
SELECT * FROM Users WHERE `created` >= FROM_UNIXTIME({$timestamp}, 'YYYY-MM-DD HH:MM:SS');

No Comments