Permalink
Browse files

Initial Revision

  • Loading branch information...
mcurry committed Oct 18, 2008
0 parents commit a5da60f7ef361b51bc7b46de3b0b6535da7560ae
Showing with 15 additions and 0 deletions.
  1. +15 −0 models/chat.php
@@ -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.