Copied! Copy Stacktrace Search Stackoverflow Search Google Exception

Database Exceptionyii\db\Exception

SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'homeworks.itYesCom_dictionary_type_work.sortForServicesWidget' which is not in SELECT list; this is incompatible with DISTINCT
The SQL being executed was: SELECT DISTINCT `itYesCom_dictionary_type_work`.`id`, `itYesCom_dictionary_type_work`.`name` FROM `itYesCom_dictionary_type_work` LEFT JOIN `itYesCom_review` ON (`itYesCom_dictionary_type_work`.`id` = `itYesCom_review`.`typeWork`) AND (`itYesCom_review`.`isPublished`=TRUE) WHERE itYesCom_review.id is not null ORDER BY `sortForServicesWidget`

Error Info: Array
(
    [0] => HY000
    [1] => 3065
    [2] => Expression #1 of ORDER BY clause is not in SELECT list, references column 'homeworks.itYesCom_dictionary_type_work.sortForServicesWidget' which is not in SELECT list; this is incompatible with DISTINCT
)
$_GET = [
    'typeWork' => '5',
];