/** * @access protected */ function OOMedia($id) { $query = 'SELECT * FROM ' . OOMedia::getTableJoin() . ' WHERE file_id = ' . $id; $sql = new sql(); // $sql->debugsql = true; $result = $sql->get_array($query); if (count($result) == 0) { trigger_error('No OOMediaCategory found with id "' . $id . '"', E_USER_ERROR); } $result = $result[0]; // var_dump( $result); $this->_id = $result['file_id']; $this->_re_id = $result['re_file_id']; $this->_cat_id = $result['category_id']; $this->_cat_name = $result['name']; $this->_name = $result['filename']; $this->_orgname = $result['originalname']; $this->_type = $result['filetype']; $this->_size = $result['filesize']; $this->_width = $result['width']; $this->_height = $result['height']; $this->_title = $result['title']; $this->_description = $result['description']; $this->_copyright = $result['copyright']; $this->_createstamp = $result['stamp']; $this->_creator = $result['user_login']; }