function __construct($ptype = false, $pid = false) { $fields = array('id', 'ptype', 'pid', 'name', 'content', 'owner', 'created'); $this->_fieldsCreate = array('ptype', 'pid', 'name', 'content', 'owner', 'created'); $this->_fieldsUpdate = array('name', 'content'); $this->_keyFields = array('id'); parent::__construct(); $this->_db = 'notes'; $this->_addField($fields, $this->_from()); if ($ptype && $pid) { $this->findBy(array("ptype='{$ptype}'", "pid='{$pid}'")); $this->_execute(); } }
function __construct($id = false) { $fields = array('id', 'computer', 'process', 'start', 'stop'); $this->_fieldsCreate = array('computer', 'process', 'start'); $this->_fieldsUpdate = array('computer', 'process', 'start', 'stop'); $this->_keyFields = array('id'); parent::__construct(); $this->_db = 'process'; $this->_addField($fields, $this->_from()); if ($id) { $this->where("id={$id}"); $this->_execute(); } }
function __construct($id = false) { $fields = array('id', 'cid', 'name', 'text', 'pid'); $this->_fieldsCreate = array('cid', 'name', 'text', 'pid'); $this->_fieldsUpdate = array('cid', 'name', 'text', 'pid'); $this->_keyFields = array('id'); //5.2.0 parent::__construct(); $this->_db = OREQ_CLASSES; $this->_addField($fields, $this->_from()); if ($id) { $this->where("id='{$id}'"); $this->_execute(); } else { $this->orderBy(''); } }