query('select c.categories_id as id, c.parent_id, c.categories_image as image, cd.categories_name as name from :table_categories c, :table_categories_description cd where c.categories_id = :categories_id and c.categories_id = cd.categories_id and cd.language_id = :language_id'); $Qcategory->bindTable(':table_categories', TABLE_CATEGORIES); $Qcategory->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION); $Qcategory->bindInt(':categories_id', $id); $Qcategory->bindInt(':language_id', $_SESSION['languages_id']); $Qcategory->execute(); if ($Qcategory->numberOfRows() === 1) { $this->_data = $Qcategory->toArray(); } } function getID() { return $this->_data['id']; } function getTitle() { return $this->_data['name']; } function getImage() { return $this->_data['image']; } } ?>