The MySQL query worked fine on my local machine using MySQL 5.6.2. On the server, they use Percona release 23, which the query failed to execute.
I used PHPMyAdmin and to test the query in both environments.

It seemed like Percona did not like the aliases, but even when I altered the aliases by putting 'x' at the end of each, it accepted the query without red flags, but the result was incorrect.

Can anybody shed some light on the differences and if I could make this code work in both environments?

This is code below works in my local machine:
groups.details AS details,
groups.group_id AS group_id,
groups.user_id AS user_id,
groups.virtual AS virtual,
groups.type AS type,
groups.location AS location, AS gdate,
users.username AS username,
groups.group_name AS group_name,
users.avatar AS avatar
FROM groups_x_members 
LEFT JOIN groups
ON groups_x_members.group_id = groups.group_id
ON groups_x_members.user_id =