I have to tables, users and user_services.
users table -> uid name email
user_services -> service_id uid
now when I do inner join like this:
SELECT * FROM users INNER JOIN user_services ON users.u_id=user_services.user_id WHERE u_id = '76'
I got 4 rows because user has 4 services() and that is ok.
My question is how to have only one row and in last column (service_id) to have:
array(1,2,3,4) / or just 1,2,3,4
If I do group by u_id I will get only one row, but in last column I will get only first service id.
This will help you to get the result .