File: includes/class.reaction.php

Recommend this page to a friend!
  Classes of SPAM  >  pork.dbObject  >  includes/class.reaction.php  >  Download  
File: includes/class.reaction.php
Role: Class source
Content type: text/plain
Description: Example class: reaction
Class: pork.dbObject
Map objects into MySQL database table rows
Author: By
Last change:
Date: 14 years ago
Size: 751 bytes


Class file image Download

class Reaction extends dbObject
$this->__setupDatabase('reactions', // database table
array('ID_Reaction' => 'ID', // database field => mapped object property
'ID_Blog' => 'ID_Blog',
'strPoster' => 'Poster',
'strEmail' => 'Email',
'strIp' => 'Ip',
'strReaction' => 'Reaction',
'datReply' => 'ReplyDate'),
'ID_Reaction', // primary table key
$ID); // value of primary key to init with (can be false for new empty object / row)
$this->addRelation('Blog'); // define a many:many relation to Blog through Reaction

"<div><h4>by {$this->Poster} @ {$this->ReplyDate}</h4><div>{$this->Reaction}</div></div>");


For more information send a message to info at phpclasses dot org.