I runned the following query in phpmyadmin (it’s working well), however, when I tried use this query in my Drupal’s code, it’s marked error in the GROUP BY.
$query = “SELECT u.id, CONCAT(u.first_name, ‘ ‘, u.last_name) AS fullname
FROM smart_is_is_user AS u LEFT JOIN smart_is_is_user__is_role AS r ON r.entity_id = u.id WHERE u.status=0 AND r.is_role_target_id = 56 GROUP BY u.id”
$results = $database->query($query)->fetchAll();
Do you know what happen?