Skip to content

Commit

Permalink
Initial Revision
Browse files Browse the repository at this point in the history
  • Loading branch information
mcurry committed Oct 18, 2008
0 parents commit a5da60f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions models/chat.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
class Chat extends ChatAppModel {
var $name = 'Chat';
var $validate = array(
'key' => VALID_NOT_EMPTY,
'handle' => VALID_NOT_EMPTY,
'text' => VALID_NOT_EMPTY
);


function purge($timestamp) {
return $this->query(sprintf('DELETE FROM chats WHERE created <= "%s"', date('Y-m-d H:i:s', $timestamp)));
}
}
?>

0 comments on commit a5da60f

Please sign in to comment.