$watches = $w->fetchAll();
- //print_R($watches);exit;
+ print_R($watches);exit;
$nn = DB_DataObject::Factory('core_notify');
$nn->ontable = $event->on_table;
}
+ function initDatabase($roo, $data) {
+ foreach($data as $d) {
+ $dd = $d;
+ if (isset($dd['active'])) {
+ unset($dd['active']);
+ }
+ $t = DB_DataObject::Factory($this->tableName());
+ $t->setFrom($dd);
+ if ($t->find(true)) {
+ continue;
+ }
+ $t = DB_DataObject::Factory($this->tableName());
+ $t->setFrom($d);
+ $t->insert();
+
+
+ }
+ }
}