setDBO(VoxelCareDB::getDatabase()); }//function function SetId($id) { $this->_id = (int)$id; $this->_item = null; } function store(&$data) { $table =& $this->getTable('orderlog'); $db =& $this->_db; $table->reset(); $id = (int)$data['id']; $table->load($id); if (!$table->bind($data)) return false; if (!$table->check()) return false; if (!$table->store(true)) return false; $this->SetId($table->id); $data['id'] = $this->_id; return true; } function getData() { if (empty($this->_item)) { $db =& $this->_db; $sql = "SELECT ol.id, ol.orderid orderid, ol.logdate logdate,ol.state state, ol.info info, ol.visibility_level visibility_level FROM #__vxc_orderlog ol WHERE ol.id = ".$this->_id; $db->setQuery($sql); $row = $db->loadObject(); if (!$row) { $row = new stdClass(); $row->id = 0; $row->state = null; $row->orderid = null; $row->logdate = null; $row->info = null; $row->visibility_level=0; } $this->_item = $row; } return $this->_item; } }// class