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 'speciali_sta.profilo_sede.primaria' which is not in SELECT list; this is incompatible with DISTINCT
The SQL being executed was: SELECT DISTINCT `iperspecializzazione`.* FROM `iperspecializzazione` LEFT JOIN `profilo_iperspecializzazione` ON `iperspecializzazione`.`id` = `profilo_iperspecializzazione`.`specializzazione_id` LEFT JOIN `profilo` ON `profilo_iperspecializzazione`.`profilo_id` = `profilo`.`id` LEFT JOIN `profilo_specializzazione` ON `profilo`.`id` = `profilo_specializzazione`.`profilo_id` LEFT JOIN `specializzazione` ON `profilo_specializzazione`.`specializzazione_id` = `specializzazione`.`id` LEFT JOIN `specializzazione_tag_assn` ON `specializzazione`.`id` = `specializzazione_tag_assn`.`specializzazione_id` LEFT JOIN `profilo_sede` ON `profilo`.`id` = `profilo_sede`.`profilo_id` LEFT JOIN `sede` ON `profilo_sede`.`sede_id` = `sede`.`id` WHERE ((`verificato`=1) AND (`specializzazione_tag_assn`.`tag_id`=967)) AND (`profilo_sede`.`primaria`=1) ORDER BY `profilo_sede`.`primaria` DESC LIMIT 6

Error Info: Array
(
    [0] => HY000
    [1] => 3065
    [2] => Expression #1 of ORDER BY clause is not in SELECT list, references column 'speciali_sta.profilo_sede.primaria' which is not in SELECT list; this is incompatible with DISTINCT
)
$_GET = [
    'specialization' => 'cataratta',
];